package com.szosen.jkzj.activity;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.json.JSONException;
import org.json.JSONObject;

import okhttp3.Call;
import okhttp3.Response;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.lzy.okgo.callback.StringCallback;
import com.szosen.application.MyApplication;
import com.szosen.database.AccessoryExamination;
import com.szosen.database.ChineseMedicineManage;
import com.szosen.database.DBService;
import com.szosen.database.Examination;
import com.szosen.database.HealthAssessment;
import com.szosen.database.InhospitalSituation;
import com.szosen.database.LifestySituation;
import com.szosen.database.MedicineSituation;
import com.szosen.database.NonimmuneInoculation;
import com.szosen.database.base_info;
import com.szosen.database.niaoye;
import com.szosen.database.tiwen;
import com.szosen.database.xindian;
import com.szosen.database.xuetang;
import com.szosen.database.xueya;
import com.szosen.device.Glucose.GLU_Activity;
import com.szosen.device.Temp.TiwenActivity;
import com.szosen.device.jianhuyi.JianHuYiActivity;
import com.szosen.jkzj.R;
import com.szosen.json.AccessoryExamination1VO;
import com.szosen.json.AccessoryExaminationVO;
import com.szosen.json.ExaminationVO;
import com.szosen.json.HealthAssessmentVO;
import com.szosen.json.HealthCheck;
import com.szosen.json.HealthCheckVO;
import com.szosen.json.JsonUtil;
import com.szosen.json.LifestySituationVO;
import com.szosen.json.Root_Return;
import com.szosen.util.BackGroundThread;
import com.szosen.util.FileSaveUtil;
import com.szosen.util.FiveColmunAdapter;
import com.szosen.util.JKTJContants;
import com.szosen.util.JktjBitmapUtil;
import com.szosen.util.SingleChoiceEditText;
import com.szosen.util.StringUtils;
import com.szosen.util.ThreeCloumAdpter;
import com.szosen.util.TimeHelper;
import com.szosen.util.ToastTool;
import com.szosen.web.Fetch;
import com.szosen.web.ResultListener;
import com.szosen.web.WebService;
import com.szosen.xml.XmlTool;

public class JKTJActivity2 extends BaseActivity implements OnClickListener {
	private Map<String, Fragment> map;
	/** 基本情况 */
	public base_info mjktj_baseInfo;
	/** 查体 */
	public Examination mjktj_Examination;
	/** 辅助检查 */
	public AccessoryExamination mjktj_AccessoryExamination;
	/** 健康评价表 */
	public HealthAssessment mjktj_HealthAssessment;
	/** 生活方式 */
	public LifestySituation mjktj_LifestySituation;
	/** 住院用药情况 */
	public MedicineSituation mjktj_MedicineSituation;
	/** 住院治疗情况 */
	public InhospitalSituation mjktj_InhospitalSituation;
	/** 非免疫接种 */
	public NonimmuneInoculation mjktj_NonimmuneInoculation;
	private List<InhospitalSituation> InhospitalSituations = new ArrayList<InhospitalSituation>();
	private List<MedicineSituation> MedicineSituations = new ArrayList<MedicineSituation>();
	private List<NonimmuneInoculation> NonimmuneInoculations = new ArrayList<NonimmuneInoculation>();
	private Button btn_next;
	private Button btn_close;
	public String from = "";
	public String time = "";
	private EditText TJRQ01, YSDM02;
	// 症状
	CheckBox zhengzhuang0, zhengzhuang1, zhengzhuang2, zhengzhuang3,
			zhengzhuang4, zhengzhuang5, zhengzhuang6, zhengzhuang7,
			zhengzhuang8, zhengzhuang9, zhengzhuang10, zhengzhuang11,
			zhengzhuang12, zhengzhuang13, zhengzhuang14, zhengzhuang15,
			zhengzhuang16, zhengzhuang17, zhengzhuang18, zhengzhuang19,
			zhengzhuang20, zhengzhuang21, zhengzhuang22, zhengzhuang23,
			zhengzhuang24;
	EditText zhengzhuang24_other;
	CheckBox[] grzzb;
	// 一般状况
	TextView GRTW01; // 体温
	TextView GRML01; // 脉率
	TextView HXPL01; // 呼吸频率
	TextView GRSG01; // 身高
	TextView GRTZ01; // 体重
	TextView TZZS01; // 体质指数
	TextView GRYW01; // 腰围
	TextView ZCXY01; // 左侧血压-收缩压
	TextView ZCXY02; // 左侧血压-扩张压
	TextView YCXY01; // 右侧血压-收缩压
	TextView YCXY02; // 右侧血压-扩张压
	RadioGroup LNZK01;// 老年人健康状态自我评估
	RadioButton manyi;
	RadioButton jibenmanyi;
	RadioButton shuobuqingchu;
	RadioButton butaimanyi;
	RadioButton bumanyi;
	RadioGroup LNZL01;// 老年人生活自理能力自我评估
	RadioButton kezili;
	RadioButton qingduyilai;
	RadioButton zhongduyilai;
	RadioButton bunengzili;
	RadioGroup LNRZ01;// 老年人认知功能
	RadioButton chushaiyinxing;
	RadioButton jianyizhili;
	EditText zongfen;
	RadioGroup LNQG01;// 老年人情感状态
	RadioButton chushaiyinxing2;
	RadioButton jianyizhili2;
	EditText zongfen2;
	// 健康体检2
	RadioGroup DLPL01; // 体育锻炼频率代码
	RadioButton DLPL01_1, DLPL01_2, DLPL01_3, DLPL01_4;
	EditText DLSJ01; // 每次锻炼时间
	EditText DLSJ02; // 坚持锻炼时间
	EditText DLFS01; // 锻炼方式
	// YSXG01 //饮食习惯
	CheckBox YSXG01_1;// 荤素均衡
	CheckBox YSXG01_2;// 荤食为主
	CheckBox YSXG01_3;// 素食为主
	CheckBox YSXG01_4;// 嗜盐
	CheckBox YSXG01_5;// 嗜糖
	CheckBox YSXG01_6;// 嗜糖
	RadioGroup XYZK01;// 吸烟状况
	RadioButton XYZK01_1;// 从不吸烟
	RadioButton XYZK01_2;// 已戒烟
	RadioButton XYZK01_3;// 吸烟
	EditText RXYL01;// 日吸烟量
	EditText XYNL01;// 开始吸烟年龄
	EditText JYNL01;// 戒烟年龄
	RadioGroup YJPL01; // 饮酒频率
	RadioButton YJPL01_1;
	RadioButton YJPL01_2;
	RadioButton YJPL01_3;
	RadioButton YJPL01_4;
	EditText RYJL01; // 日饮酒量
	RadioGroup JJBZ01; // 是否戒酒
	RadioButton JJBZ01_1;// 未戒酒
	RadioButton JJBZ01_2;// 已戒酒
	EditText JJNL01; // 戒酒年龄
	EditText YJNL01; // 开始饮酒年龄
	RadioGroup SFZJ01; // 近一年是否醉酒
	RadioButton SFZJ01_1;
	RadioButton SFZJ01_2;
	// YJZL01; //饮酒种类代码（多选）
	CheckBox YJZL01_1;
	CheckBox YJZL01_2;
	CheckBox YJZL01_3;
	CheckBox YJZL01_4;
	CheckBox YJZL01_5;
	EditText YJZLBC; // 饮酒种类（其他）
	EditText WHYS01_et;// 职业病危害
	EditText WHGZ01; // 危害工种
	EditText CYSJ01; // 从业时间
	EditText ZFZL01; // 毒物种类-粉尘
	RadioGroup FHCS01; // 粉尘-防护措施
	RadioButton FHCS01_1;
	RadioButton FHCS01_2;
	EditText FSWZ01; // 毒物种类-放射物质
	RadioGroup FHCS03; // 放射物质-防护措施
	RadioButton FHCS03_1;
	RadioButton FHCS03_2;
	EditText WLYS01; // 毒物种类-物理因素
	RadioGroup FHCS04; // 物理因素-防护措施
	RadioButton FHCS04_1;
	RadioButton FHCS04_2;
	EditText HXWZ01; // 毒物种类-化学物质
	RadioGroup FHCS05; // 化学物质-防护措施
	RadioButton FHCS05_1;
	RadioButton FHCS05_2;
	EditText QTZL01; // 毒物种类-其他
	RadioGroup FHCS02; // 其他-防护措施
	RadioButton FHCS02_1;
	RadioButton FHCS02_2;
	EditText FHCS01_3, FHCS03_3, FHCS04_3, FHCS05_3, FHCS02_3;
	CheckBox[] YJZL01;
	CheckBox[] YSXG01;
	// 健康体检3
	RadioGroup KC0001;
	RadioButton hongrun;// 红润
	RadioButton cangbai;// 苍白
	RadioButton fajian;// 发绀
	RadioButton junlie;// 皲裂
	RadioButton paozhen;// 疱疹
	RadioGroup CL0001;// 齿列：
	CheckBox CL0001_Q;// 缺齿
	CheckBox CL0001_Z;// 正常
	CheckBox CL0001_J;// 龋齿
	CheckBox CL0001_Y;// 义齿（假牙)
	SingleChoiceEditText jktj3_qcwz;
	SingleChoiceEditText jktj3_qvcwz;
	SingleChoiceEditText jktj3_ycwz;
	CheckBox[] CL0001_;
	RadioGroup YB0001;// 咽部：
	RadioButton YB0001_WCX;// 无充血
	RadioButton YB0001_CX;// 充血
	RadioButton YB0001_LB;// 淋巴滤泡增生
	EditText ZYSL01;// 左眼视力
	EditText YYSL01;// 右眼视力
	EditText ZYJZ01;// (矫正视力:左眼 "
	EditText YYJZ01;// 右眼
	RadioGroup TL0001;// 听 力
	RadioButton TL0001_TJ;// 听见
	RadioButton TL0001_TBJ;// 听不清或无法听见

	RadioGroup YDNL01;// 运动功能
	RadioButton YDNL01_KWC;// 可顺利完成
	RadioButton YDNL01_WFWC;// 无法独立完成其中任何一个动作
	// 健康体检4
	RadioGroup YDQK01;// 眼底
	RadioButton YDQK01_1;// 正常
	RadioButton YDQK01_2;// 异常
	EditText YDQK01_3;// 补充
	RadioGroup PFQK01;// 皮肤
	RadioButton PFQK01_1;// 正常
	RadioButton PFQK01_2;// 潮红
	RadioButton PFQK01_3;// 苍白
	RadioButton PFQK01_4;// 发绀
	RadioButton PFQK01_5;// 黄染
	RadioButton PFQK01_6;// 色素沉着
	RadioButton PFQK01_7;// 其他
	EditText PFQK01_8;// 补充
	RadioGroup GMQK01;// 巩膜
	RadioButton GMQK01_1;// 正常
	RadioButton GMQK01_2;// 黄染
	RadioButton GMQK01_3;// 充血
	RadioButton GMQK01_4;// 其他
	EditText GMQK01_5;// 补充
	RadioGroup LBQK01;// 巩膜
	RadioButton LBQK01_1;// 未触及
	RadioButton LBQK01_2;// 锁骨上
	RadioButton LBQK01_3;// 腋窝
	RadioButton LBQK01_4;// 其他
	EditText LBQK01_5;// 补充
	RadioGroup TZX001;// "桶状胸"
	RadioButton TZX001_1;// 否
	RadioButton TZX001_2;// 是
	//
	RadioGroup HXY001;// 呼吸音
	RadioButton HXY001_1;// 正常
	RadioButton HXY001_2;// 异常
	EditText HXY001_3;// 补充
	//
	RadioGroup LYQK01;// 罗音
	RadioButton LYQK01_1;// 无
	RadioButton LYQK01_2;// 干罗音
	RadioButton LYQK01_3;// 湿罗音
	RadioButton LYQK01_4;// 其他
	EditText LYQK01_5;// 补充
	//
	EditText XLCS01;//
	RadioGroup XLQK01;// 心律：
	RadioButton XLQK01_1;// 齐
	RadioButton XLQK01_2;// 不齐
	RadioButton XLQK01_3;// 绝对不齐
	//
	RadioGroup ZYQK01;// 杂音：
	RadioButton ZYQK01_1;// 无
	RadioButton ZYQK01_2;// 有
	EditText ZYQK01_3;// 补充
	//
	RadioGroup FBYT01;// 压痛
	RadioButton FBYT01_1;// 无
	RadioButton FBYT01_2;// 有
	EditText FBYT01_3;// 补充
	//
	RadioGroup FBBK01;// 包块：：
	RadioButton FBBK01_1;// 无
	RadioButton FBBK01_2;// 有
	EditText FBBK01_3;// 补充
	//
	RadioGroup FBGD01;// 肝大：：
	RadioButton FBGD01_1;// 无
	RadioButton FBGD01_2;// 有
	EditText FBGD01_3;// 补充
	//
	RadioGroup FBPD01;// 脾大：
	RadioButton FBPD01_1;// 无
	RadioButton FBPD01_2;// 有
	EditText FBPD01_3;// 补充
	//
	RadioGroup FBZY01;// 移动性浊音：
	RadioButton FBZY01_1;// 无
	RadioButton FBZY01_2;// 有
	EditText FBZY01_3;// 补充
	//
	RadioGroup XZSZ01;// 下肢水肿
	RadioButton XZSZ01_1;// 无
	RadioButton XZSZ01_2;// 单侧
	RadioButton XZSZ01_3;// 双侧不对称
	RadioButton XZSZ01_4;// 双侧对称
	//
	//
	RadioGroup ZBDMBD;// 足背动脉搏动
	RadioButton ZBDMBD_1;// 未触及
	RadioButton ZBDMBD_2;// 触及双侧对称
	RadioButton ZBDMBD_3;// 触及左侧弱或消失
	RadioButton ZBDMBD_4;// 触及右侧弱或消失
	//
	RadioGroup GMZZ01;// 肛门指诊
	RadioButton GMZZ01_1;// 未见异常
	RadioButton GMZZ01_2;// 触痛
	RadioButton GMZZ01_3;// 前列腺异常
	RadioButton GMZZ01_4;// 包块
	RadioButton GMZZ01_5;// 其他
	EditText GMZZ01_6;// 补充
	RadioButton[] gmzz01;

	RadioGroup RX0001;// 乳腺
	RadioButton RX0001_1;// 未见异常
	RadioButton RX0001_2;// 乳房切除
	RadioButton RX0001_3;// 异常泌乳
	RadioButton RX0001_4;// 乳腺包块
	RadioButton RX0001_5;// 其他
	EditText RX0001_6;// 补充
	RadioButton[] rx0001;

	RadioGroup FKWY01;// 外阴：
	RadioButton FKWY01_1;// 未见异常
	RadioButton FKWY01_2;// 异常
	EditText FKWY01_3;// 补充

	RadioGroup FKYD01;// 阴道：
	RadioButton FKYD01_1;// 未见异常
	RadioButton FKYD01_2;// 异常
	EditText FKYD01_3;// 补充

	RadioGroup FKGJ01;// 宫颈：
	RadioButton FKGJ01_1;// 未见异常
	RadioButton FKGJ01_2;// 异常
	EditText FKGJ01_3;// 补充

	RadioGroup FKGT01;// 宫体：
	RadioButton FKGT01_1;// 未见异常
	RadioButton FKGT01_2;// 异常
	EditText FKGT01_3;// 补充

	RadioGroup FKFJ01;// 附件：
	RadioButton FKFJ01_1;// 未见异常
	RadioButton FKFJ01_2;// 异常
	EditText FKFJ01_3;// 补充

	EditText CTQT01;// 查体其他
	// 健康体检5
	EditText XHDB01;// 血红蛋白
	EditText XCGBXB;// 白细胞
	EditText XCGXXB;// 血小板
	EditText XCGQT1;// 其他
	EditText NCGNDB;// 尿蛋白
	EditText NCGNT1;// 白细胞
	EditText NCGNTT;// 尿酮体
	EditText NCGNQX;// 尿潜血
	EditText NCGQT1;// 其他
					//
	EditText KFXT01;// 血糖
	EditText KFXT02;// 血糖
	RadioGroup XDT001;// 心电图*
	RadioButton XDT001_1;// 正常
	RadioButton XDT001_2;// 异常
	EditText XDT001_3;
	EditText NWLBDB;
	EditText THXHDB;// 糖化血红蛋白*
	RadioGroup DBQX01;// 大便潜血*
	RadioButton DBQX01_1;// 阴
	RadioButton DBQX01_2;// 阳
	RadioGroup GYBMKY;// 乙型肝炎表面抗原*
	RadioButton GYBMKY_1;// 阴
	RadioButton GYBMKY_2;// 阳
	EditText GBZAM1;// 血清谷丙转氨酶
	EditText GCZAM1;// 血清谷草转氨酶
	EditText BDB001;// 白蛋白
	EditText ZDHS01;// 总胆红素
	EditText JHDHS1;// 结合胆红素
	EditText XQJG01;// 血清肌酐
	EditText XNSD01;// 血尿素氮
	EditText XJND01;// 血钾浓度
	EditText XNND01;// 血钠浓度
	EditText ZDGC01;// 总胆固醇
	EditText GYSZ01;// 甘油三酯
	EditText DDBDGC;// 血清低密度脂蛋白胆固醇
	EditText GDBDGC;// 血清高密度脂蛋白胆固醇
	RadioGroup XBXXP1;// 胸部X线片*
	RadioButton XBXXP1_1;// 正常
	RadioButton XBXXP1_2;// 异常
	EditText XBXXP1_3;
	RadioGroup BC0001;// B超*
	RadioButton BC0001_1;// 正常
	RadioButton BC0001_2;// 异常
	EditText BC0001_3;
	RadioGroup GJTP01;// 宫颈涂片**
	RadioButton GJTP01_1;// 正常
	RadioButton GJTP01_2;// 异常
	EditText GJTP01_3;// 描述
	EditText FZJCQT; // 其他
	// 健康体检6
	RadioGroup ZYPHZ1; // 中医平和质代码
	RadioButton ZYPHZ1_0;
	RadioButton ZYPHZ1_1;
	RadioButton ZYPHZ1_2;
	RadioGroup ZYQXZ1; // 中医气虚质代码
	RadioButton ZYQXZ1_0;
	RadioButton ZYQXZ1_1;
	RadioButton ZYQXZ1_2;
	RadioGroup ZYYXZ1; // 中医阳虚质代码
	RadioButton ZYYXZ1_0;
	RadioButton ZYYXZ1_1;
	RadioButton ZYYXZ1_2;
	RadioGroup ZYYXZ2; // 中医阴虚质代码
	RadioButton ZYYXZ2_0;
	RadioButton ZYYXZ2_1;
	RadioButton ZYYXZ2_2;
	RadioGroup ZYTXZ1; // 中医痰湿质代码
	RadioButton ZYTXZ1_0;
	RadioButton ZYTXZ1_1;
	RadioButton ZYTXZ1_2;
	RadioGroup ZYXRZ1; // 中医湿热质代码
	RadioButton ZYXRZ1_0;
	RadioButton ZYXRZ1_1;
	RadioButton ZYXRZ1_2;
	RadioGroup ZYXYZ1; // 中医血瘀质代码
	RadioButton ZYXYZ1_0;
	RadioButton ZYXYZ1_1;
	RadioButton ZYXYZ1_2;
	RadioGroup ZYQYZ1; // 中医气郁质代码
	RadioButton ZYQYZ1_0;
	RadioButton ZYQYZ1_1;
	RadioButton ZYQYZ1_2;
	RadioGroup ZYTBZ1; // 中医特秉质代码
	RadioButton ZYTBZ1_1;
	RadioButton ZYTBZ1_0;
	RadioButton ZYTBZ1_2;
	// 健康体检7
	// 脑血管疾病
	CheckBox NXGJB1_1, NXGJB1_2, NXGJB1_3, NXGJB1_4, NXGJB1_5, NXGJB1_6;
	EditText NXGJB3;
	// 肾脏疾病
	CheckBox SZJB01_1, SZJB01_2, SZJB01_3, SZJB01_4, SZJB01_5, SZJB01_6;
	EditText SZJB03;
	// 心脏疾病
	CheckBox XZJB01_1, XZJB01_2, XZJB01_3, XZJB01_4, XZJB01_5, XZJB01_6,
			XZJB01_7;
	EditText XZJB03;
	// 心血管疾病
	CheckBox XGJB01_1, XGJB01_2, XGJB01_3, XGJB01_4;
	EditText XGJB03;
	// 眼部疾病
	CheckBox YBJB01_1, YBJB01_2, YBJB01_3, YBJB01_4;
	EditText YBJB03;
	// 神经系统疾病
	RadioGroup SJXT01;
	RadioButton SJXT01_1, SJXT01_2;
	EditText SJXT02;
	// 其他系统疾病
	RadioGroup QTXT01;
	RadioButton QTXT01_1, QTXT01_2;
	EditText QTXT02;
	CheckBox[] NXGJB1_;
	CheckBox[] SZJB01_;
	CheckBox[] XZJB01_;
	CheckBox[] YBJB01_;
	CheckBox[] XGJB01_;
	// 健康体检8
	CheckBox JKZD01_1, JKZD01_2, JKZD01_3, JKZD01_4;
	EditText JKZD02;
	CheckBox WXYS01_1, WXYS01_2, WXYS01_3, WXYS01_4, WXYS01_5, WXYS01_6,
			WXYS01_7;
	EditText JTZMB1, JZYM02, QTYS01;
	CheckBox[] WXYS;
	CheckBox[] JKZD;
	ListView yyqkListView;
	Button addMedicine;
	ListView fmyghyfjzs;
	Button addfmyghyfjzs;
	// 住院史
	EditText QSRQ01_0, ZZRQ01_0, ZYYY01_0, YLJG02_0, BAH001_0;
	EditText QSRQ01_1, ZZRQ01_1, ZYYY01_1, YLJG02_1, BAH001_1;
	EditText QSRQ01_2, ZZRQ01_2, ZYYY01_2, YLJG02_2, BAH001_2;
	// 家庭病床史
	EditText QSRQ01_3, ZZRQ01_3, ZYYY01_3, YLJG02_3, BAH001_3;
	EditText QSRQ01_4, ZZRQ01_4, ZYYY01_4, YLJG02_4, BAH001_4;
	EditText QSRQ01_5, ZZRQ01_5, ZYYY01_5, YLJG02_5, BAH001_5;
	CheckBox JKPJ01_1, JKPJ01_2;
	EditText JKYC01_1, JKYC02_1, JKYC03_1, JKYC04_1;
	LayoutInflater inflater1;
	List<String[]> datas5 = new ArrayList<String[]>();
	List<String[]> datas3 = new ArrayList<String[]>();
	FiveColmunAdapter adapter5;
	ThreeCloumAdpter adapter3;
	private HealthAssessment ha;// 健康评估
	public static final int tiwen_requestCode = 1;
	public static final int xueya_requestCode = 2;

	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		System.out.println("执行了jktj1的oonactivityresult的方法。");
		if (resultCode == tiwen_requestCode) {
			String temp = data.getStringExtra("temp");
			if (!TextUtils.isEmpty(temp)) {
				GRTW01.setText(temp);
				// 体温的数值
			}
		}
		if (resultCode == xueya_requestCode) {
			String dbp = data.getStringExtra("dbp");
			String sbp = data.getStringExtra("sbp");
			String pulse = data.getStringExtra("pulse");
			if (!TextUtils.isEmpty(dbp) && !TextUtils.isEmpty(sbp)
					&& !TextUtils.isEmpty(pulse)) {
				GRML01.setText(pulse);
				ZCXY01.setText(dbp);
				ZCXY02.setText(sbp);
				// 体温的数值
			}
		}
		if (resultCode == 6) {
			String glu = data.getStringExtra("glu");
			if (!TextUtils.isEmpty(glu)) {
				// 体温的数值
				KFXT01.setText(glu);
			}
		}
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_jktj);
		initView();
		// 判断是新建体检表还是旧数据
		from = getIntent().getStringExtra("flag");
		if (from != null && from.equals("new")) {
			time = TimeHelper.getMainTimeKey();
		} else {
			time = getIntent().getStringExtra("time");
			System.out.println("初始化健康体检：测量时间" + time);
		}
		getDataFromDataBase();

	}

	private void initView() {
		// 先从数据库初始化每个表的数据
		btn_next = (Button) findViewById(R.id.btn_next);
		btn_next.setOnClickListener(this);
		btn_close = (Button) findViewById(R.id.btn_close);
		btn_close.setOnClickListener(this);
		Activity view = this;
		InitView1(view);
		initView2(view);
		initView3(view);
		initView4(view);
		initView5(view);
		initView6(view);
		initView7(view);
		InitView8(view);
	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

	private long exitTime = 0;

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK
				&& event.getAction() == KeyEvent.ACTION_DOWN) {
			if ((System.currentTimeMillis() - exitTime) > 2000) {
				Toast.makeText(getApplicationContext(), "再按一次返回！",
						Toast.LENGTH_SHORT).show();
				exitTime = System.currentTimeMillis();
			} else {
				finish();
			}
			return true;
		}
		return super.onKeyDown(keyCode, event);
	}

	/**
	 * 设置新建体检表的默认勾选的选项
	 */
	private void setDefaultNew() {
		kezili.setChecked(true);
		manyi.setChecked(true);
		chushaiyinxing.setChecked(true);
		chushaiyinxing2.setChecked(true);
		YSXG01_1.setChecked(true);
		YJPL01_2.setChecked(true);
		WHYS01_et.setText("无");
		FHCS01_1.setChecked(true);
		FHCS02_1.setChecked(true);
		FHCS03_1.setChecked(true);
		FHCS04_1.setChecked(true);
		FHCS05_1.setChecked(true);
		hongrun.setChecked(true);
		YB0001_WCX.setChecked(true);
		TL0001_TJ.setChecked(true);
		YDNL01_KWC.setChecked(true);
		PFQK01_1.setChecked(true);
		GMQK01_1.setChecked(true);
		LBQK01_1.setChecked(true);
		TZX001_1.setChecked(true);
		HXY001_1.setChecked(true);
		LYQK01_1.setChecked(true);
		XLQK01_1.setChecked(true);
		ZYQK01_1.setChecked(true);
		FBYT01_1.setChecked(true);
		FBBK01_1.setChecked(true);
		FBGD01_1.setChecked(true);
		FBPD01_1.setChecked(true);
		FBZY01_1.setChecked(true);
		XZSZ01_1.setChecked(true);
		ZBDMBD_2.setChecked(true);
		// BC0001_1.setChecked(true);
		NXGJB1_6.setChecked(true);
		SZJB01_1.setChecked(true);
		XZJB01_1.setChecked(true);
		XGJB01_1.setChecked(true);
		YBJB01_1.setChecked(true);
		SJXT01_1.setChecked(true);
		QTXT01_1.setChecked(true);
		WXYS01_3.setChecked(true);
		WXYS01_4.setChecked(true);
	}

	@SuppressWarnings("unchecked")
	public void getDataFromDataBase() {
		if ("new".equals(from)) {
			mIdCard = BaseActivity.getIdCard();
			TJRQ01.setText(TimeHelper.getJKTJCheckDate());
			setDefaultNew();
			// 新建体检表的时候，从数据库获取数据
			// 血压
			xueya xueyaBean = new xueya();
			xueyaBean.setIdCard(BaseActivity.getIdCard());
			List<xueya> xueyas = (List<xueya>) DBService
					.queryByIdCard(xueyaBean);
			if (xueyas != null && xueyas.size() > 0) {
				xueya bean = xueyas.get(xueyas.size() - 1);
				String dbp = bean.getDbp();
				String sbp = bean.getSbp();
				String pulse = bean.getPulse();
				String hand = bean.getHand();
				if ("右".equals(hand)) {
					YCXY01.setText(sbp);
					YCXY02.setText(dbp);
				} else {
					ZCXY01.setText(sbp);
					ZCXY02.setText(dbp);
				}
				GRML01.setText(pulse);
			}
			// 体温
			tiwen tiwenBean = new tiwen();
			tiwenBean.setIdCard(BaseActivity.getIdCard());
			List<tiwen> tiwens = (List<tiwen>) DBService
					.queryByIdCard(tiwenBean);
			if (tiwens != null && tiwens.size() > 0) {
				tiwen bean = tiwens.get(tiwens.size() - 1);
				String temp = bean.getTemp();
				GRTW01.setText(temp);
			}
			// 体温
			niaoye ny = new niaoye();
			ny.setIdCard(BaseActivity.getIdCard());
			List<niaoye> nys = (List<niaoye>) DBService.queryByIdCard(ny);
			if (nys != null && nys.size() > 0) {
				niaoye bean = nys.get(nys.size() - 1);
				String pro = bean.getPro();// 尿蛋白
				String glu = bean.getGlu();// 尿糖
				String dka = bean.getKet();// 尿酮体
				String bld = bean.getBld();// 尿潜血
				NCGNDB.setText(pro);// 尿蛋白
				NCGNT1.setText(glu);// 尿糖
				NCGNTT.setText(dka);// 尿酮体
				NCGNQX.setText(bld);// 尿潜血
			}
			// 血糖
			xuetang xuetangBean = new xuetang();
			xuetangBean.setIdCard(BaseActivity.getIdCard());
			List<xuetang> xuetangs = (List<xuetang>) DBService
					.queryByIdCard(xuetangBean);
			if (xuetangs != null && xuetangs.size() > 0) {
				xuetang bean = xuetangs.get(xuetangs.size() - 1);
				String glu = bean.getGlu();
				String ba = bean.getBeforeafter();
				// 判断是餐后血糖还是餐前血糖
				if ("后".equals(ba)) {
					KFXT02.setText(glu);
				} else {
					KFXT01.setText(glu);
				}

			}
			try {
				// 如果心电图没有东西的话，就从数据库获取这个数据。
				xindian xindianBean = new xindian();
				xindianBean.setIdCard(BaseActivity.getIdCard());
				List<xindian> xindians = (List<xindian>) DBService
						.queryByIdCard(xindianBean);
				if (xindians != null && xindians.size() > 0) {
					xindian bean = xindians.get(xindians.size() - 1);
					String rhythm = bean.getRhythm();
					System.out.println("体检表获取了心电图结论：" + rhythm);
					if (rhythm.contains("正常心电图")) {
						XDT001_1.setChecked(true);
					} else {
						XDT001_2.setChecked(true);
					}
					if (rhythm.length() > 1 && rhythm.startsWith("：")) {
						rhythm = rhythm.substring(1, rhythm.length());
					}
					if (rhythm.startsWith("结论：") && rhythm.length() > 3) {
						int index = rhythm.indexOf("结论：");
						rhythm = rhythm.substring(3, rhythm.length());
					}
					String text = rhythm;
					XDT001_3.setText(text.trim().replace("\n", ","));
				}
			} catch (Exception e) {
			}
			mjktj_baseInfo = new base_info();
			/** 查体 */
			mjktj_Examination = new Examination();
			/** 非免疫接种 */
			mjktj_NonimmuneInoculation = new NonimmuneInoculation();
			/** 辅助检查 */
			mjktj_AccessoryExamination = new AccessoryExamination();
			/** 健康评价表 */
			mjktj_HealthAssessment = new HealthAssessment();
			/** 生活方式 */
			mjktj_LifestySituation = new LifestySituation();
			/** 住院用药情况 */
			mjktj_MedicineSituation = new MedicineSituation();
			/** 住院治疗情况 */
			mjktj_InhospitalSituation = new InhospitalSituation();
			// 查询一下体质的表。自动填写。
			ChineseMedicineManage queryObj = new ChineseMedicineManage();
			queryObj.setIdCard(BaseActivity.getIdCard());
			List<Object> lists = (List<Object>) DBService
					.queryByIdCard(queryObj);
			ChineseMedicineManage manage;
			if (lists.size() > 0) {
				manage = (ChineseMedicineManage) lists.get(0);
				String ph1 = manage.getPhysiqueIdentify1();
				String ph2 = manage.getPhysiqueIdentify2();
				String ph3 = manage.getPhysiqueIdentify3();
				String ph4 = manage.getPhysiqueIdentify4();
				String ph5 = manage.getPhysiqueIdentify5();
				String ph6 = manage.getPhysiqueIdentify6();
				String ph7 = manage.getPhysiqueIdentify7();
				String ph8 = manage.getPhysiqueIdentify8();
				String ph9 = manage.getPhysiqueIdentify9();
				if ("1".equals(ph1)) {
					ZYQXZ1_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYQXZ1_2.setChecked(true);
				}
				if ("1".equals(ph2)) {
					ZYYXZ1_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYYXZ1_2.setChecked(true);
				}
				if ("1".equals(ph3)) {
					ZYYXZ2_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYYXZ2_2.setChecked(true);
				}
				if ("1".equals(ph4)) {
					ZYTXZ1_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYTXZ1_2.setChecked(true);
				}
				if ("1".equals(ph5)) {
					ZYXRZ1_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYXRZ1_2.setChecked(true);
				}
				if ("1".equals(ph6)) {
					ZYXYZ1_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYXYZ1_2.setChecked(true);
				}
				if ("1".equals(ph7)) {
					ZYQYZ1_1.setChecked(true);
				} else if ("1".equals(ph1)) {
					ZYQYZ1_2.setChecked(true);
				}
				if ("1".equals(ph8)) {
					ZYTBZ1_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYTBZ1_2.setChecked(true);
				}
				if ("1".equals(ph9)) {
					ZYPHZ1_1.setChecked(true);
				} else if ("2".equals(ph1)) {
					ZYPHZ1_2.setChecked(true);
				}
			} else {
				return;
			}
			return;
		}
		System.out.println("执行了、、、健康体检的。获取数据库" + time);
		String idCard = BaseActivity.getIdCard();
		base_info b = new base_info();
		// b.setIdCard(idCard);
		b.setTime(time);
		Examination e = new Examination();
		e.setTime(time);
		NonimmuneInoculation n = new NonimmuneInoculation();
		n.setTime(time);
		AccessoryExamination a = new AccessoryExamination();
		a.setTime(time);
		HealthAssessment h = new HealthAssessment();
		h.setTime(time);
		LifestySituation l = new LifestySituation();
		l.setTime(time);
		MedicineSituation m = new MedicineSituation();
		m.setTime(time);
		InhospitalSituation i = new InhospitalSituation();
		i.setTime(time);
		List<base_info> bs = (List<base_info>) DBService.queryByKey(b);
		if (bs.size() > 0) {
			mjktj_baseInfo = bs.get(0);
		}
		/** 查体 */
		List<Examination> es = (List<Examination>) DBService.queryByKey(e);
		if (es.size() > 0) {
			mjktj_Examination = es.get(0);
		}
		List<NonimmuneInoculation> ns = (List<NonimmuneInoculation>) DBService
				.queryByKey(n);
		if (ns.size() > 0) {
			mjktj_NonimmuneInoculation = ns.get(0);
		}
		List<AccessoryExamination> as = (List<AccessoryExamination>) DBService
				.queryByKey(a);
		if (as.size() > 0) {
			mjktj_AccessoryExamination = as.get(0);
		}
		List<HealthAssessment> hs = (List<HealthAssessment>) DBService
				.queryByKey(h);
		if (hs.size() > 0) {
			mjktj_HealthAssessment = hs.get(0);
		}
		List<LifestySituation> ls = (List<LifestySituation>) DBService
				.queryByKey(l);
		if (ls.size() > 0) {
			mjktj_LifestySituation = ls.get(0);
		}
		List<MedicineSituation> ms = (List<MedicineSituation>) DBService
				.queryByKey(m);
		if (ms.size() > 0) {
			mjktj_MedicineSituation = ms.get(0);
		}
		List<InhospitalSituation> is = (List<InhospitalSituation>) DBService
				.queryByKey(i);
		if (is.size() > 0) {
			mjktj_InhospitalSituation = is.get(0);
		}
		if (from != null && !from.equals("new")) {
			System.out.println("是从就得数据来的");
			// 如果是旧的记录。
			mjktj_baseInfo = (mjktj_baseInfo == null ? new base_info()
					: mjktj_baseInfo);
			/** 查体 */
			mjktj_Examination = (mjktj_Examination == null ? new Examination()
					: mjktj_Examination);
			/** 非免疫接种 */
			mjktj_NonimmuneInoculation = (mjktj_NonimmuneInoculation == null ? new NonimmuneInoculation()
					: mjktj_NonimmuneInoculation);
			/** 辅助检查 */
			mjktj_AccessoryExamination = (mjktj_AccessoryExamination == null ? new AccessoryExamination()
					: mjktj_AccessoryExamination);
			/** 健康评价表 */
			mjktj_HealthAssessment = (mjktj_HealthAssessment == null ? new HealthAssessment()
					: mjktj_HealthAssessment);
			/** 生活方式 */
			mjktj_LifestySituation = (mjktj_LifestySituation == null ? new LifestySituation()
					: mjktj_LifestySituation);
			/** 住院用药情况 */
			mjktj_MedicineSituation = (mjktj_MedicineSituation == null ? new MedicineSituation()
					: mjktj_MedicineSituation);
			/** 住院治疗情况 */
			mjktj_InhospitalSituation = (mjktj_InhospitalSituation == null ? new InhospitalSituation()
					: mjktj_InhospitalSituation);
		}
		setContent1();
		setContent2();
		setContent3();
		setContent4();
		setContent5();
		setContent6();
		setContent7();
		setContent8();
	}

	@SuppressLint("ResourceAsColor")
	@Override
	protected void onResume() {
		super.onResume();
		TextView tv_service_state = (TextView) findViewById(R.id.tv_server_state);
		if (tv_service_state != null) {
			if (MyApplication.isConnected()) {
				tv_service_state.setTextColor(R.color.color_service_connected);
				tv_service_state.setText("已连接");
			} else {
				tv_service_state
						.setTextColor(R.color.color_service_noconnected);
				tv_service_state.setText("未连接");
			}
		}
		TextView tv_title = (TextView) findViewById(R.id.main_all_tv_title);
		if (tv_title != null) {
			tv_title.setText("【健康体检】");
		}
	};

	@Override
	public void onClick(View v) {
		if (v == btn_close) {
			finish();
		}
		if (v.getId() == R.id.btn_next) {
			if (!isEditTextOK()) {
				return;
			}
			getUpload1();
			getUpload2();
			getUpload3();
			getUpload4();
			getUpload5();
			getUpload6();
			getUpload7();
			getUpload8();
			// mCheckDate = BaseActivity.getJktjTime();
			// mjktj_baseInfo.setCheckDate(time);
			mjktj_baseInfo.setIdCard(mIdCard);
			mjktj_baseInfo.setCheckid(time);
			System.out.println("最后保存打印的点击：mCheckDate" + time);
			mjktj_baseInfo.setTime(time);
			/** 查体 */
			mjktj_Examination.setTime(time);
			/** 非免疫接种 */
			mjktj_NonimmuneInoculation.setTime(time);
			/** 辅助检查 */
			mjktj_AccessoryExamination.setTime(time);
			/** 健康评价表 */
			mjktj_HealthAssessment.setTime(time);
			/** 生活方式 */
			mjktj_LifestySituation.setTime(time);
			/** 住院用药情况 */
			mjktj_MedicineSituation.setTime(time);
			/** 住院治疗情况 */
			mjktj_InhospitalSituation.setTime(time);
			String xml = null;
			String uploadStr = XmlTool.getJktj2String(mjktj_baseInfo,
					mjktj_LifestySituation, mjktj_Examination,
					mjktj_AccessoryExamination, mjktj_InhospitalSituation,
					mjktj_MedicineSituation, mjktj_NonimmuneInoculation,
					mjktj_HealthAssessment);
			// FileSaveUtil.saveTxtFile("666", "666", uploadStr);
			boolean b = DBService.add(mjktj_baseInfo);
			/** 查体 */
			boolean e = DBService.add(mjktj_Examination);
			/** 非免疫接种 */
			boolean n = DBService.add(mjktj_NonimmuneInoculation);
			/** 辅助检查 */
			boolean a = DBService.add(mjktj_AccessoryExamination);
			/** 健康评价表 */
			boolean h = DBService.add(mjktj_HealthAssessment);
			/** 生活方式 */
			boolean l = DBService.add(mjktj_LifestySituation);
			/** 住院用药情况 */
			boolean m = DBService.add(mjktj_MedicineSituation);
			/** 住院治疗情况 */
			boolean i = DBService.add(mjktj_InhospitalSituation);
			HealthCheck hc = new HealthCheck();
			hc.setHealthCheck("");// 检查单号
			hc.setEmpiId(time);// 创业唯一标识
			hc.setPhrId("");// 档案编号
			hc.setIdCard(BaseActivity.getIdCard());
			hc.setCheckId(time);
			// hc.setCheckDate(checkDate)
			hc.setCheckDate(mjktj_baseInfo.getCheckDate());
			hc.setManaDoctorId(MyApplication.getOnDoctorId());// 这里是医生码
			hc.setManaUnitId(MyApplication.getOngovId());// 这里是医院码
			hc.setCreateUser(MyApplication.getOnDoctorId());// 录入员工
			hc.setCreateUnit(MyApplication.getOngovId());// 录入单位
			hc.setCreateDate(mjktj_baseInfo.getCheckDate());// 录入日期
			hc.setLastModifyUnit(MyApplication.getOngovId());// 最后修改单位
			hc.setLastModifyUser(MyApplication.getOnDoctorId());// 最后修改人
			hc.setLastModifyDate(mjktj_baseInfo.getCheckDate());// 最后修改日期
			HealthCheckVO hcvo = new HealthCheckVO();
			String symptom = mjktj_baseInfo.getSymptom();
			if (!TextUtils.isEmpty(symptom) && symptom.endsWith(",")) {
				symptom = symptom.substring(0, symptom.length() - 1);
			}
			hcvo.setSymptom(symptom);
			hcvo.setSymptomOt(mjktj_baseInfo.getSymptomOt());
			hcvo.setTemperature(StringUtils.parseDoubleByStr(mjktj_baseInfo
					.getTemperature()));
			hcvo.setBreathe(StringUtils.parseIntByStr(mjktj_baseInfo
					.getBreathe()));
			hcvo.setPulse(StringUtils.parseIntByStr(mjktj_baseInfo.getPulse()));
			hcvo.setConstriction(StringUtils.parseIntByStr(mjktj_baseInfo
					.getConstriction()));
			hcvo.setDiastolic(StringUtils.parseIntByStr(mjktj_baseInfo
					.getDiastolic()));
			hcvo.setConstriction_L(StringUtils.parseIntByStr(mjktj_baseInfo
					.getConstriction_L()));
			hcvo.setDiastolic_L(StringUtils.parseIntByStr(mjktj_baseInfo
					.getDiastolic_L()));
			hcvo.setHeight(StringUtils.parseDoubleByStr(mjktj_baseInfo
					.getHeight()));
			hcvo.setWeight(StringUtils.parseDoubleByStr(mjktj_baseInfo
					.getWeight()));
			hcvo.setWaistline(StringUtils.parseDoubleByStr(mjktj_baseInfo
					.getWaistline()));
			hcvo.setBmi(StringUtils.parseDoubleByStr(mjktj_baseInfo.getBmi()));
			hcvo.setHealthStatus(mjktj_baseInfo.getHealthStatus());
			hcvo.setCognitive(mjktj_baseInfo.getCognitive());
			hcvo.setCognitiveZf(StringUtils.parseDoubleByStr(mjktj_baseInfo
					.getCognitiveZf()));
			hcvo.setEmotion(mjktj_baseInfo.getEmotion());
			hcvo.setEmotionZf(StringUtils.parseDoubleByStr(mjktj_baseInfo
					.getEmotionZf()));
			String csd = mjktj_baseInfo.getCerebrovascularDiseases();
			if (!TextUtils.isEmpty(csd) && csd.endsWith(",")) {
				csd = csd.substring(0, csd.length() - 1);
			}
			hcvo.setCerebrovascularDiseases(csd);
			hcvo.setOthercerebrovascularDiseases(mjktj_baseInfo
					.getOthercerebrovascularDiseases());
			String hd = mjktj_baseInfo.getHeartDisease();
			if (!TextUtils.isEmpty(hd) && hd.endsWith(",")) {
				hd = hd.substring(0, hd.length() - 1);
			}
			hcvo.setHeartDisease(hd);
			hcvo.setOtherheartDisease(mjktj_baseInfo.getOtherheartDisease());
			hcvo.setKidneyDiseases(mjktj_baseInfo.getKidneyDiseases());
			hcvo.setOtherkidneyDiseases(mjktj_baseInfo.getOtherkidneyDiseases());
			hcvo.setVascularDisease(mjktj_baseInfo.getVascularDisease());
			hcvo.setOtherVascularDisease(mjktj_baseInfo
					.getOtherVascularDisease());
			hcvo.setEyeDiseases(mjktj_baseInfo.getEyeDiseases());
			hcvo.setOthereyeDiseases(mjktj_baseInfo.getOthereyeDiseases());
			hcvo.setNeurologicalDiseases(mjktj_baseInfo
					.getNeurologicalDiseases());
			hcvo.setNeurologicalDiseasesDesc(mjktj_baseInfo
					.getNeurologicalDiseasesDesc());
			hcvo.setOtherDiseasesone(mjktj_baseInfo.getOtherDiseasesone());
			hcvo.setOtherDiseasesoneDesc(mjktj_baseInfo
					.getOtherDiseasesoneDesc());
			hc.setHealthCheck(hcvo);
			LifestySituationVO lifestySituation = new LifestySituationVO();
			// lifestySituation.setLifestySituation(mjktj_LifestySituation.ge)//记录编号
			// lifestySituation.sethealthCheck(mjktj_LifestySituation.ge)//年检编号
			lifestySituation
					.setPhysicalExerciseFrequency(mjktj_LifestySituation
							.getPhysicalExerciseFrequency());
			// lifestySituation.setTrainTimesWeek(mjktj_LifestySituation.get);//周运动次数，暂时没有
			lifestySituation.setEveryPhysicalExerciseTime(StringUtils
					.parseIntByStr(mjktj_LifestySituation
							.getEveryPhysicalExerciseTime()));
			lifestySituation.setInsistexercisetime(mjktj_LifestySituation
					.getInsistexercisetime());
			lifestySituation.setExerciseStyle(mjktj_LifestySituation
					.getExerciseStyle());
			lifestySituation.setDietaryHabit(mjktj_LifestySituation
					.getDietaryHabit());
			lifestySituation.setWehtherSmoke(mjktj_LifestySituation
					.getWehtherSmoke());
			lifestySituation.setBeginSmokeTime(StringUtils
					.parseIntByStr(mjktj_LifestySituation.getBeginSmokeTime()));
			lifestySituation.setStopSmokeTime(StringUtils
					.parseIntByStr(mjktj_LifestySituation.getStopSmokeTime()));
			lifestySituation.setSmokes(StringUtils
					.parseIntByStr(mjktj_LifestySituation.getSmokes()));
			lifestySituation.setDrinkingFrequency(mjktj_LifestySituation
					.getDrinkingFrequency());
			lifestySituation.setAlcoholConsumption(StringUtils
					.parseIntByStr(mjktj_LifestySituation
							.getAlcoholConsumption()));
			lifestySituation.setWhetherDrink(mjktj_LifestySituation
					.getWhetherDrink());
			lifestySituation
					.setStopDrinkingTime(StringUtils
							.parseIntByStr(mjktj_LifestySituation
									.getStopDrinkingTime()));
			lifestySituation
					.setBeginToDrinkTime(StringUtils
							.parseIntByStr(mjktj_LifestySituation
									.getBeginToDrinkTime()));
			lifestySituation.setIsDrink(mjktj_LifestySituation.getIsDrink());
			String mainDrinkingVvarieties = mjktj_LifestySituation
					.getMainDrinkingVvarieties();
			if (!TextUtils.isEmpty(mainDrinkingVvarieties)
					&& mainDrinkingVvarieties.endsWith(",")) {
				mainDrinkingVvarieties = mainDrinkingVvarieties.substring(0,
						mainDrinkingVvarieties.length() - 1);
			}
			lifestySituation.setMainDrinkingVvarieties(mainDrinkingVvarieties);
			lifestySituation.setDrinkOther(mjktj_LifestySituation
					.getDrinkOther());
			lifestySituation.setOccupational(mjktj_LifestySituation
					.getOccupational());
			lifestySituation.setJobs(mjktj_LifestySituation.getJobs());
			lifestySituation.setWorkTime(StringUtils
					.parseIntByStr(mjktj_LifestySituation.getWorkTime()));
			lifestySituation.setDust(mjktj_LifestySituation.getDust());
			lifestySituation.setDustPro(mjktj_LifestySituation.getDustPro());
			lifestySituation.setDustProDesc(mjktj_LifestySituation
					.getDustProDesc());
			lifestySituation.setRay(mjktj_LifestySituation.getRay());
			lifestySituation.setRayPro(mjktj_LifestySituation.getRayPro());
			lifestySituation.setRayProDesc(mjktj_LifestySituation
					.getRayProDesc());
			lifestySituation.setPhysicalFactor(mjktj_LifestySituation
					.getPhysicalFactor());
			lifestySituation.setPhysicalFactorPro(mjktj_LifestySituation
					.getPhysicalFactorPro());
			lifestySituation.setPhysicalFactorProDesc(mjktj_LifestySituation
					.getPhysicalFactorProDesc());
			lifestySituation
					.setChemicals(mjktj_LifestySituation.getChemicals());
			lifestySituation.setChemicalsPro(mjktj_LifestySituation
					.getChemicalsPro());
			lifestySituation.setChemicalsProDesc(mjktj_LifestySituation
					.getChemicalsProDesc());
			lifestySituation.setOther(mjktj_LifestySituation.getOther());
			lifestySituation.setOtherPro(mjktj_LifestySituation.getOtherPro());
			lifestySituation.setOtherProDesc(mjktj_LifestySituation
					.getOtherProDesc());
			hc.setLifestySituation(lifestySituation);
			AccessoryExamination1VO AccessoryExamination1 = new AccessoryExamination1VO();
			// AccessoryExamination1.setRecordId(recordId);
			// AccessoryExamination1.setHealthCheck("");
			AccessoryExamination1.setLip(mjktj_AccessoryExamination.getLip());
			AccessoryExamination1.setDenture(mjktj_AccessoryExamination
					.getDenture());
			AccessoryExamination1.setHypodontia(JKTJContants.CHILIE
					.getCodeByPosition(mjktj_AccessoryExamination
							.getHypodontia()));
			AccessoryExamination1.setDecay(JKTJContants.CHILIE
					.getCodeByPosition(mjktj_AccessoryExamination.getDecay()));
			AccessoryExamination1.setFalsethooh(JKTJContants.CHILIE
					.getCodeByPosition(mjktj_AccessoryExamination
							.getFalsethooh()));
			AccessoryExamination1.setPharyngeal(mjktj_AccessoryExamination
					.getPharyngeal());
			AccessoryExamination1.setLeftEye(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getLeftEye()));
			AccessoryExamination1
					.setRightEye(StringUtils
							.parseDoubleByStr(mjktj_AccessoryExamination
									.getRightEye()));
			AccessoryExamination1.setRecLeftEye(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination
							.getRecLeftEye()));
			AccessoryExamination1.setRecRightEye(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination
							.getRecRightEye()));
			AccessoryExamination1.setHearing(mjktj_AccessoryExamination
					.getHearing());
			AccessoryExamination1.setMotion(mjktj_AccessoryExamination
					.getMotion());
			hc.setAccessoryExamination1(AccessoryExamination1);
			// 查体
			ExaminationVO examination = new ExaminationVO();
			examination.setExamination("");// 记录编号
			examination.setHealthCheck("");// 年检编号
			examination.setFundus(mjktj_Examination.getFundus());
			examination.setFundusDesc(mjktj_Examination.getFundusDesc());
			examination.setSkin(mjktj_Examination.getSkin());
			examination.setSkinDesc(mjktj_Examination.getSkinDesc());
			examination.setSclera(mjktj_Examination.getSclera());
			examination.setScleraDesc(mjktj_Examination.getScleraDesc());
			examination.setLymphnodes(mjktj_Examination.getLymphnodes());
			examination
					.setLymphnodesDesc(mjktj_Examination.getLymphnodesDesc());
			examination.setBarrelChest(mjktj_Examination.getBarrelChest());
			examination.setBreathSound(mjktj_Examination.getBreathSound());
			examination.setBreathSoundDesc(mjktj_Examination
					.getBreathSoundDesc());
			examination.setRales(mjktj_Examination.getRales());
			examination.setRalesDesc(mjktj_Examination.getRalesDesc());
			examination.setHeartRate(StringUtils
					.parseIntByStr(mjktj_Examination.getHeartRate()));
			examination.setRhythm(mjktj_Examination.getRhythm());
			examination.setHeartMurmur(mjktj_Examination.getHeartMurmur());
			examination.setHeartMurmurDesc(mjktj_Examination
					.getHeartMurmurDesc());
			examination.setAbdominAltend(mjktj_Examination.getAbdominAltend());
			examination.setAbdominAltendDesc(mjktj_Examination
					.getAbdominAltendDesc());
			examination.setAdbominAlmass(mjktj_Examination.getAdbominAlmass());
			examination.setAdbominAlmassDesc(mjktj_Examination
					.getAdbominAlmassDesc());
			examination.setLiverBig(mjktj_Examination.getLiverBig());
			examination.setLiverBigDesc(mjktj_Examination.getLiverBigDesc());
			examination.setSplenomegaly(mjktj_Examination.getSplenomegaly());
			examination.setSplenomegalyDesc(mjktj_Examination
					.getSplenomegalyDesc());
			examination.setDullness(mjktj_Examination.getDullness());
			examination.setDullnessDesc(mjktj_Examination.getDullnessDesc());
			examination.setEdema(mjktj_Examination.getEdema());
			examination.setFootPulse(mjktj_Examination.getFootPulse());
			String dre = mjktj_Examination.getDre();
			if (!TextUtils.isEmpty(dre) && dre.endsWith(",")) {
				dre = dre.substring(0, dre.length() - 1);
			}
			examination.setDre(dre);
			examination.setDreDesc(mjktj_Examination.getDreDesc());
			String breast = mjktj_Examination.getBreast();
			if (!TextUtils.isEmpty(breast) && breast.endsWith(",")) {
				breast = breast.substring(0, breast.length() - 1);
			}
			examination.setBreast(breast);
			examination.setBreastDesc(mjktj_Examination.getBreastDesc());
			examination.setVulva(mjktj_Examination.getVulva());
			examination.setVulvaDesc(mjktj_Examination.getVulvaDesc());
			examination.setVaginal(mjktj_Examination.getVaginal());
			examination.setVaginalDesc(mjktj_Examination.getVaginalDesc());
			examination.setCervix(mjktj_Examination.getCervix());
			examination.setCervixDesc(mjktj_Examination.getCervixDesc());
			examination.setPalace(mjktj_Examination.getPalace());
			examination.setPalaceDesc(mjktj_Examination.getPalaceDesc());
			examination.setAttachment(mjktj_Examination.getAttachment());
			examination
					.setAttachmentDesc(mjktj_Examination.getAttachmentDesc());
			// examination.setAttachment1(mjktj_Examination.getatt)//附件右，暂时没有
			examination.setTjother(mjktj_Examination.getTjother());
			hc.setExamination(examination);
			AccessoryExaminationVO accessoryExamination = new AccessoryExaminationVO();
			accessoryExamination.setRecordId("");
			accessoryExamination.setHealthCheck("");
			accessoryExamination.setHgb(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getHgb()));
			accessoryExamination.setWbc(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getWbc()));
			accessoryExamination
					.setPlatelet(StringUtils
							.parseDoubleByStr(mjktj_AccessoryExamination
									.getPlatelet()));
			accessoryExamination.setBloodOther(mjktj_AccessoryExamination
					.getBloodOther());
			accessoryExamination.setProteinuria(mjktj_AccessoryExamination
					.getProteinuria());
			accessoryExamination.setGlu(mjktj_AccessoryExamination.getGlu());
			accessoryExamination.setDka(mjktj_AccessoryExamination.getDka());
			accessoryExamination.setOc(mjktj_AccessoryExamination.getOc());
			accessoryExamination.setUrineOther(mjktj_AccessoryExamination
					.getUrineOther());
			accessoryExamination.setFbs(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getFbs()));
			accessoryExamination.setFbsdw("mmol/L");// 单位
			accessoryExamination.setPbs(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getPbs()));
			accessoryExamination.setPbsdw("mmol/L");
			accessoryExamination.setMalb(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getMalb()));
			accessoryExamination.setFob(mjktj_AccessoryExamination.getFob());
			accessoryExamination.setEcg(mjktj_AccessoryExamination.getEcg());
			accessoryExamination.setEcgText(mjktj_AccessoryExamination
					.getEcgText());
			accessoryExamination.setHba1c(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getHba1c()));
			accessoryExamination
					.setHbsag(mjktj_AccessoryExamination.getHbsag());
			accessoryExamination.setAlt(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getAlt()));
			accessoryExamination.setAst(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getAst()));
			accessoryExamination.setAlb(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getAlb()));
			accessoryExamination.setTbil(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getTbil()));
			accessoryExamination.setDbil(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getDbil()));
			accessoryExamination.setCr(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getCr()));
			accessoryExamination.setBun(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getBun()));
			accessoryExamination.setKalemia(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getKalemia()));
			accessoryExamination
					.setNatremia(StringUtils
							.parseDoubleByStr(mjktj_AccessoryExamination
									.getNatremia()));
			// accessoryExamination.setTrioxypurine(mjktj_AccessoryExamination.getti)//尿酸浓度。暂时没有
			accessoryExamination.setTc(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getTc()));
			accessoryExamination.setTg(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getTg()));
			accessoryExamination.setLdl(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getLdl()));
			accessoryExamination.setHdl(StringUtils
					.parseDoubleByStr(mjktj_AccessoryExamination.getHdl()));
			accessoryExamination.setX(mjktj_AccessoryExamination.getX());
			accessoryExamination
					.setxText(mjktj_AccessoryExamination.getXText());
			accessoryExamination.setB(mjktj_AccessoryExamination.getB());
			accessoryExamination
					.setbText(mjktj_AccessoryExamination.getBText());

			// accessoryExamination.setFb(mjktj_AccessoryExamination.getFb;//B
			// accessoryExamination.setFbText(mjktj_AccessoryExamination.get)//其他B超异常描述
			accessoryExamination.setPs(mjktj_AccessoryExamination.getPs());
			accessoryExamination.setPsText(mjktj_AccessoryExamination
					.getPsText());
			accessoryExamination.setFuOther(mjktj_AccessoryExamination
					.getFuOther());
			// 辅助检查
			hc.setAccessoryExamination(accessoryExamination);
			// 这个是住院治疗情况
			List<com.szosen.json.InhospitalSituation> InhospitalSituationList = new ArrayList<com.szosen.json.InhospitalSituation>();
			for (int j = 0; j < InhospitalSituations.size(); j++) {
				InhospitalSituation is = InhospitalSituations.get(j);
				com.szosen.json.InhospitalSituation is2 = new com.szosen.json.InhospitalSituation();
				// is2.setSituationId(situationId);//记录序号，暂时没有
				// is2.setHealthCheck("");//年检编号，暂时没有
				is2.setType(is.getType());
				is2.setInhospitalDate(is.getInhospitalDate());
				is2.setOuthospitalDate(is.getOuthospitalDate());
				is2.setInhospitalReason(is.getInhospitalReason());
				is2.setMedicalestablishmentName(is
						.getMedicalestablishmentName());
				is2.setMedicalrecordNumber(is.getMedicalrecordNumber());
				InhospitalSituationList.add(is2);
			}
			// 住院治疗情况
			hc.setInhospitalSituation(InhospitalSituationList);

			List<com.szosen.json.MedicineSituation> medicineSituationList = new ArrayList<com.szosen.json.MedicineSituation>();
			for (int j = 0; j < MedicineSituations.size(); j++) {
				MedicineSituation ms = MedicineSituations.get(j);
				com.szosen.json.MedicineSituation ms2 = new com.szosen.json.MedicineSituation();
				ms2.setSituationId("");// 记录序号，暂时没有
				ms2.setHealthCheck("");// 年检编号，暂时没有
				ms2.setMedicineYield(ms.getMedicineYield());
				ms2.setMedicine(ms.getMedicine());
				ms2.setUse(ms.getUse());
				ms2.setEachDose(ms.getEachDose());
				ms2.setUseDate(ms.getUseDate());
				ms2.setDescr(ms.getDescr());
				medicineSituationList.add(ms2);
			}
			hc.setMedicineSituation(medicineSituationList);
			HealthAssessmentVO healthAssessment = new HealthAssessmentVO();
			// healthAssessment.setAssessmentId("");//评价编号，暂时没有
			healthAssessment.setHealthCheck("");// 年检编号，暂时没有
			healthAssessment.setAbnormality(mjktj_HealthAssessment
					.getAbnormality());
			healthAssessment.setAbnormality1(mjktj_HealthAssessment
					.getAbnormality1());
			healthAssessment.setAbnormality2(mjktj_HealthAssessment
					.getAbnormality2());
			healthAssessment.setAbnormality3(mjktj_HealthAssessment
					.getAbnormality3());
			healthAssessment.setAbnormality4(mjktj_HealthAssessment
					.getAbnormality4());
			healthAssessment.setMana(mjktj_HealthAssessment.getMana());
			String riskfactorsControl = mjktj_HealthAssessment
					.getRiskfactorsControl();
			if (!TextUtils.isEmpty(riskfactorsControl)
					&& riskfactorsControl.endsWith(",")) {
				riskfactorsControl = riskfactorsControl.substring(0,
						riskfactorsControl.length() - 1);
			}
			healthAssessment.setRiskfactorsControl(riskfactorsControl);
			healthAssessment.setTargetWeight(StringUtils
					.parseIntByStr(mjktj_HealthAssessment.getTargetWeight()));
			healthAssessment.setVaccine(mjktj_HealthAssessment.getVaccine());
			healthAssessment.setPjOther(mjktj_HealthAssessment.getPjOther());
			hc.setHealthAssessment(healthAssessment);
			String hcJsonStr = new Gson().toJson(hc);
			System.out.println("b:" + b + "e:" + e + "n:" + n + "a:" + a + "h:"
					+ h + "l:" + l + "m:" + m + "i:" + i);
			final String uploadTime = time;
			WebService.addHealthCheck(context, uploadTime, jsonHandler, hc);
		}
	}

	private static final int what_success_ok = 65;
	private static final int what_failed = 77;
	private static final int what_error = 87;
	Handler jsonHandler = new Handler() {
		public void handleMessage(Message msg) {
			switch (msg.what) {
			case what_success_ok:
				ToastTool.showLong(context, "上传成功");
				break;
			case what_failed:
				ToastTool.showLong(context, "" + msg.obj);
				break;
			case what_error:
				ToastTool.showLong(context, "访问出错，请检查网络或配置信息");
				break;
			}
		};
	};

	/***
	 * 检查编辑框。是否可以编辑的。
	 *
	 * @return
	 */
	public boolean isEditTextOK() {
		if (TextUtils.isEmpty(TJRQ01.getText().toString())) {
			ToastTool.showShort(context, "体检日期不能为空！");
			return false;
		} else if (TextUtils.isEmpty(ZCXY01.getText().toString())) {
			ToastTool.showShort(context, "左侧血压值不能为空！");
			return false;
		} else if (TextUtils.isEmpty(ZCXY02.getText().toString())) {
			ToastTool.showShort(context, "左侧血压值不能为空！");
			return false;
		}
//		} else if (TextUtils.isEmpty(YCXY01.getText().toString())) {
//			ToastTool.showShort(context, "右侧血压值不能为空！");
//			return false;
//		} else if (TextUtils.isEmpty(YCXY02.getText().toString())) {
//			ToastTool.showShort(context, "右侧血压值不能为空！");
//			return false;
//		}
		String ssy = ZCXY01.getText().toString();
		String szy = ZCXY02.getText().toString();
		String ssy2 = YCXY01.getText().toString();
		String szy2 = YCXY02.getText().toString();
		try {
			if (Integer.parseInt(ssy) > 140 || Integer.parseInt(ssy2) > 140) {
				ToastTool.showShort(context, "收缩压过高，请注意该用户是否血压高！");
			}
			if (Integer.parseInt(szy) > 90|| Integer.parseInt(szy2) > 90) {
				ToastTool.showShort(context, "舒张压过高，请注意该用户是否血压高！");
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return true;
	}

	private void InitView1(Activity view) {
		TJRQ01 = (EditText) view.findViewById(R.id.TJRQ01);
		// TJRQ01.setOnClickListener(new OnClickListener() {
		//
		// @Override
		// public void onClick(View v) {
		//
		// }
		// });
		// Button jktj1_btn_tiwen = (Button) view
		// .findViewById(R.id.jktj1_btn_tiwen);
		// jktj1_btn_tiwen.setOnClickListener(new OnClickListener() {
		//
		// @Override
		// public void onClick(View v) {
		// Intent intent = new Intent(JKTJActivity2.this,
		// TiwenActivity.class);
		// intent.putExtra("from", "jktj");
		// startActivityForResult(intent, tiwen_requestCode);
		// }
		// });
		YSDM02 = (EditText) view.findViewById(R.id.YSDM02);
		zhengzhuang0 = (CheckBox) view.findViewById(R.id.zhengzhuang0);
		zhengzhuang1 = (CheckBox) view.findViewById(R.id.zhengzhuang1);
		zhengzhuang2 = (CheckBox) view.findViewById(R.id.zhengzhuang2);
		zhengzhuang3 = (CheckBox) view.findViewById(R.id.zhengzhuang3);
		zhengzhuang4 = (CheckBox) view.findViewById(R.id.zhengzhuang4);
		zhengzhuang5 = (CheckBox) view.findViewById(R.id.zhengzhuang5);
		zhengzhuang6 = (CheckBox) view.findViewById(R.id.zhengzhuang6);
		zhengzhuang7 = (CheckBox) view.findViewById(R.id.zhengzhuang7);
		zhengzhuang8 = (CheckBox) view.findViewById(R.id.zhengzhuang8);
		zhengzhuang9 = (CheckBox) view.findViewById(R.id.zhengzhuang9);
		zhengzhuang10 = (CheckBox) view.findViewById(R.id.zhengzhuang10);
		zhengzhuang11 = (CheckBox) view.findViewById(R.id.zhengzhuang11);
		zhengzhuang12 = (CheckBox) view.findViewById(R.id.zhengzhuang12);
		zhengzhuang13 = (CheckBox) view.findViewById(R.id.zhengzhuang13);
		zhengzhuang14 = (CheckBox) view.findViewById(R.id.zhengzhuang14);
		zhengzhuang15 = (CheckBox) view.findViewById(R.id.zhengzhuang15);
		zhengzhuang16 = (CheckBox) view.findViewById(R.id.zhengzhuang16);
		zhengzhuang17 = (CheckBox) view.findViewById(R.id.zhengzhuang17);
		zhengzhuang18 = (CheckBox) view.findViewById(R.id.zhengzhuang18);
		zhengzhuang19 = (CheckBox) view.findViewById(R.id.zhengzhuang19);
		zhengzhuang20 = (CheckBox) view.findViewById(R.id.zhengzhuang20);
		zhengzhuang21 = (CheckBox) view.findViewById(R.id.zhengzhuang21);
		zhengzhuang22 = (CheckBox) view.findViewById(R.id.zhengzhuang22);
		zhengzhuang23 = (CheckBox) view.findViewById(R.id.zhengzhuang23);
		zhengzhuang24 = (CheckBox) view.findViewById(R.id.zhengzhuang24);
		zhengzhuang24_other = (EditText) view
				.findViewById(R.id.zhengzhuang24_other);
		GRTW01 = (TextView) view.findViewById(R.id.GRTW01);
		GRML01 = (TextView) view.findViewById(R.id.GRML01);
		HXPL01 = (TextView) view.findViewById(R.id.HXPL01);
		GRSG01 = (TextView) view.findViewById(R.id.GRSG01);
		GRTZ01 = (TextView) view.findViewById(R.id.GRTZ01);
		TZZS01 = (TextView) view.findViewById(R.id.TZZS01);
		GRYW01 = (TextView) view.findViewById(R.id.GRYW01);
		ZCXY01 = (TextView) view.findViewById(R.id.ZCXY01);
		// 身高
		GRSG01.addTextChangedListener(new TextWatcher() {
			private CharSequence temp;

			@Override
			public void onTextChanged(CharSequence s, int start, int before,
					int count) {
				temp = s;
			}

			@Override
			public void beforeTextChanged(CharSequence s, int start, int count,
					int after) {

			}

			@Override
			public void afterTextChanged(Editable s) {
				String tizhong = GRTZ01.getText().toString().trim();
				if (!TextUtils.isEmpty(tizhong) && !TextUtils.isEmpty(temp)) {
					try {
						float shengaoF = Float.parseFloat(temp.toString());
						float tizhongF = Float.parseFloat(tizhong);
						float tizhi = tizhongF
								/ ((shengaoF / 100) * (shengaoF / 100));
						TZZS01.setText("" + (float) (Math.round(tizhi * 10))
								/ 10);
					} catch (Exception e) {

					}
				}
			}
		});
		// 体重
		GRTZ01.addTextChangedListener(new TextWatcher() {
			private CharSequence temp;

			@Override
			public void onTextChanged(CharSequence s, int start, int before,
					int count) {
				temp = s;
			}

			@Override
			public void beforeTextChanged(CharSequence s, int start, int count,
					int after) {

			}

			@Override
			public void afterTextChanged(Editable s) {
				String shengao = GRSG01.getText().toString().trim();
				if (!TextUtils.isEmpty(shengao) && !TextUtils.isEmpty(temp)) {
					try {
						float tizhongF = Float.parseFloat(temp.toString());
						float shengaoF = Float.parseFloat(shengao);
						float tizhi = tizhongF
								/ ((shengaoF / 100) * (shengaoF / 100));
						TZZS01.setText("" + (float) (Math.round(tizhi * 10))
								/ 10);
					} catch (Exception e) {

					}
				}
			}
		});
		// // 左侧血压
		// Button btn_ZCXY01 = (Button) view.findViewById(R.id.btn_ZCXY01);
		// btn_ZCXY01.setOnClickListener(new OnClickListener() {
		// @Override
		// public void onClick(View v) {
		// Intent intent = new Intent(JKTJActivity2.this,
		// JianHuYiActivity.class);
		// intent.putExtra("fromxueya", "xueya");
		// startActivityForResult(intent, xueya_requestCode);
		// }
		// });
		ZCXY02 = (TextView) view.findViewById(R.id.ZCXY02);
		YCXY01 = (TextView) view.findViewById(R.id.YCXY01);
		YCXY02 = (TextView) view.findViewById(R.id.YCXY02);

		LNZK01 = (RadioGroup) view.findViewById(R.id.LNZK01);
		manyi = (RadioButton) view.findViewById(R.id.manyi);
		jibenmanyi = (RadioButton) view.findViewById(R.id.jibenmanyi);
		shuobuqingchu = (RadioButton) view.findViewById(R.id.shuobuqingchu);
		butaimanyi = (RadioButton) view.findViewById(R.id.butaimanyi);
		bumanyi = (RadioButton) view.findViewById(R.id.bumanyi);

		LNZL01 = (RadioGroup) view.findViewById(R.id.LNZL01);
		kezili = (RadioButton) view.findViewById(R.id.kezili);
		qingduyilai = (RadioButton) view.findViewById(R.id.qingduyilai);
		zhongduyilai = (RadioButton) view.findViewById(R.id.zhongduyilai);
		bunengzili = (RadioButton) view.findViewById(R.id.bunengzili);

		LNRZ01 = (RadioGroup) view.findViewById(R.id.LNRZ01);
		chushaiyinxing = (RadioButton) view.findViewById(R.id.chushaiyinxing);
		jianyizhili = (RadioButton) view.findViewById(R.id.jianyizhili);
		zongfen = (EditText) view.findViewById(R.id.zongfen);

		LNQG01 = (RadioGroup) view.findViewById(R.id.LNQG01);
		chushaiyinxing2 = (RadioButton) view.findViewById(R.id.chushaiyinxing2);
		jianyizhili2 = (RadioButton) view.findViewById(R.id.jianyizhili2);
		zongfen2 = (EditText) view.findViewById(R.id.zongfen2);
		grzzb = new CheckBox[] { zhengzhuang0, zhengzhuang1, zhengzhuang2,
				zhengzhuang3, zhengzhuang4, zhengzhuang5, zhengzhuang6,
				zhengzhuang7, zhengzhuang8, zhengzhuang9, zhengzhuang10,
				zhengzhuang11, zhengzhuang12, zhengzhuang13, zhengzhuang14,
				zhengzhuang15, zhengzhuang16, zhengzhuang17, zhengzhuang18,
				zhengzhuang19, zhengzhuang20, zhengzhuang21, zhengzhuang22,
				zhengzhuang23, zhengzhuang24 };
		for (int i = 0; i < grzzb.length; i++) {
			grzzb[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int j = 1; j < grzzb.length; j++) {
						if (zhengzhuang0 == v && zhengzhuang0.isChecked()) {
							grzzb[j].setChecked(false);
						} else {
							grzzb[0].setChecked(false);
						}
					}
				}
			});
		}

	}

	public void setContent1() {
		base_info dataBean = mjktj_baseInfo;
		if (dataBean == null) {
			return;
		}
		if (from != null && "new".equals(from)) {
			mIdCard = BaseActivity.getIdCard();
		} else {
			mIdCard = mjktj_baseInfo.getIdCard();
		}
		TJRQ01.setText(dataBean.getCheckDate());
		YSDM02.setText(dataBean.getDoctorName());
		// 症状
		String grzz = dataBean.getSymptom();
		String[] grzzs = grzz.split(",");
		for (int i = 0; i < grzzs.length; i++) {
			try {
				if (TextUtils.isEmpty(grzzs[i])) {
					continue;
				}
				if (grzzs[i].length() >= 2) {
					grzzs[i] = grzzs[i].replace("0", "");
				}
				int index = Integer.valueOf(grzzs[i]);
				if (index >= 0 && index <= 24) {
					grzzb[index - 1].setChecked(true);
				}
				if (i == 24) {
					zhengzhuang24_other.setText(dataBean.getSymptomOt());
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		// 查询数据库。看看体温是有没有的。

		// 体温
		GRTW01.setText(dataBean.getTemperature());
		HXPL01.setText(dataBean.getBreathe());
		GRML01.setText(dataBean.getPulse());
		YCXY01.setText(dataBean.getConstriction());
		YCXY02.setText(dataBean.getDiastolic());
		ZCXY01.setText(dataBean.getConstriction_L());
		ZCXY02.setText(dataBean.getDiastolic_L());
		GRSG01.setText(dataBean.getHeight());
		GRTZ01.setText(dataBean.getWeight());
		GRYW01.setText(dataBean.getWaistline());
		TZZS01.setText(dataBean.getBmi());
		// 老年人自理能力
		String selfCare = dataBean.getSelfCare();
		if ("1".equals(selfCare)) {
			kezili.setChecked(true);
		} else if ("2".equals(selfCare)) {
			qingduyilai.setChecked(true);
		} else if ("3".equals(selfCare)) {
			zhongduyilai.setChecked(true);
		} else if ("4".equals(selfCare)) {
			bunengzili.setChecked(true);
		}

		// 老年人健康状态
		String lnrjkzt = dataBean.getHealthStatus();
		if ("1".equals(lnrjkzt)) {
			manyi.setChecked(true);
		} else if ("2".equals(lnrjkzt)) {
			jibenmanyi.setChecked(true);
		} else if ("3".equals(lnrjkzt)) {
			shuobuqingchu.setChecked(true);
		} else if ("4".equals(lnrjkzt)) {
			butaimanyi.setChecked(true);
		} else if ("5".equals(lnrjkzt)) {
			bumanyi.setChecked(true);
		}

		// 老年人认知功能
		String lnrrzgn = dataBean.getCognitive();
		if ("1".equals(lnrrzgn)) {
			chushaiyinxing.setChecked(true);
		} else if ("2".equals(lnrrzgn)) {
			jianyizhili.setChecked(true);
			zongfen.setText(dataBean.getCognitiveZf());// 阳性就填写评分
		}

		// 老年人情感状态
		String lnrqgzt = dataBean.getEmotion();
		if ("1".equals(lnrqgzt)) {
			chushaiyinxing2.setChecked(true);
		} else if ("2".equals(lnrqgzt)) {
			jianyizhili2.setChecked(true);
			zongfen2.setText(dataBean.getEmotionZf());// 阳性就填写评分
		}
	}

	public String getUpload1() {
		System.out.println("jktj1的getupload执行了");
		System.out.println("体检日期是空吗？" + TJRQ01 == null);
		base_info uploadBean = mjktj_baseInfo;
		if (uploadBean == null) {
			return "";
		}
		if (TJRQ01 == null) {
			return "";
		}
		uploadBean.setCheckDate(getTextByEt(TJRQ01));// 体检日期
		uploadBean.setTime(time);// 体检日期
		BaseActivity.setJktjTime(TJRQ01.getText().toString());
		uploadBean.setDoctorName(getTextByEt(YSDM02));// 医生姓名
		uploadBean.setIdCard(BaseActivity.getIdCard());
		StringBuilder sb_grzz = new StringBuilder();
		for (int i = 0; i < grzzb.length; i++) {
			if (grzzb[i].isChecked()) {
				if (i >= 0 && i < 9) {
					sb_grzz.append("0" + (i + 1) + ",");//
				} else {
					sb_grzz.append(i + 1 + ",");// 1-25的症状。
				}
				if (i == 24) {
					uploadBean.setSymptomOt(zhengzhuang24_other.getText()
							.toString());
				}
			}
		}
		uploadBean.setSymptom(sb_grzz.toString());// 症状
		uploadBean.setTemperature(GRTW01.getText().toString());// 体温
		uploadBean.setBreathe(HXPL01.getText().toString());
		uploadBean.setPulse(GRML01.getText().toString());
		uploadBean.setConstriction(YCXY01.getText().toString());
		uploadBean.setDiastolic(YCXY02.getText().toString());
		uploadBean.setConstriction_L(ZCXY01.getText().toString());
		uploadBean.setDiastolic_L(ZCXY02.getText().toString());
		uploadBean.setHeight(GRSG01.getText().toString());
		BaseActivity.setHeight(GRSG01.getText().toString());
		uploadBean.setWeight(GRTZ01.getText().toString());
		uploadBean.setWaistline(GRYW01.getText().toString());
		uploadBean.setBmi(TZZS01.getText().toString());
		uploadBean.setWeight(GRTZ01.getText().toString());
		String selfCare = "";// 老年人自理能力
		if (kezili.isChecked()) {
			selfCare = "1";
		}
		if (qingduyilai.isChecked()) {
			selfCare = "2";
		}
		if (zhongduyilai.isChecked()) {
			selfCare = "3";
		}
		if (bunengzili.isChecked()) {
			selfCare = "4";
		}
		uploadBean.setSelfCare(selfCare);

		// 老年人健康状态
		String lnrjkzt = "";
		if (manyi.isChecked()) {
			lnrjkzt = "1";
		}
		if (jibenmanyi.isChecked()) {
			lnrjkzt = "2";
		}
		if (shuobuqingchu.isChecked()) {
			lnrjkzt = "3";
		}
		if (butaimanyi.isChecked()) {
			lnrjkzt = "4";
		}
		if (bumanyi.isChecked()) {
			lnrjkzt = "5";
		}
		uploadBean.setHealthStatus(lnrjkzt);
		// 老年人认知功能
		if (chushaiyinxing.isChecked()) {
			uploadBean.setCognitive("1");// 阴性
		}
		if (jianyizhili.isChecked()) {
			uploadBean.setCognitive("2");// 阳性
			uploadBean.setCognitiveZf(zongfen.getText().toString());// 阳性就填写评分
		}

		// 老年人情感状态
		if (chushaiyinxing2.isChecked()) {
			uploadBean.setEmotion("1");
		}
		if (jianyizhili2.isChecked()) {
			uploadBean.setEmotion("2");
			uploadBean.setEmotionZf(zongfen2.getText().toString());
		}
		return getTextByEt(TJRQ01);
	}

	private void initView2(Activity view) {
		DLPL01 = (RadioGroup) view.findViewById(R.id.DLPL01);
		DLPL01_1 = (RadioButton) view.findViewById(R.id.DLPL01_1);
		DLPL01_2 = (RadioButton) view.findViewById(R.id.DLPL01_2);
		DLPL01_3 = (RadioButton) view.findViewById(R.id.DLPL01_3);
		DLPL01_4 = (RadioButton) view.findViewById(R.id.DLPL01_4);

		DLSJ01 = (EditText) view.findViewById(R.id.DLSJ01);
		DLSJ02 = (EditText) view.findViewById(R.id.DLSJ02);
		DLFS01 = (EditText) view.findViewById(R.id.DLFS01);

		YSXG01_1 = (CheckBox) view.findViewById(R.id.YSXG01_1);
		YSXG01_2 = (CheckBox) view.findViewById(R.id.YSXG01_2);
		YSXG01_3 = (CheckBox) view.findViewById(R.id.YSXG01_3);
		YSXG01_4 = (CheckBox) view.findViewById(R.id.YSXG01_4);
		YSXG01_5 = (CheckBox) view.findViewById(R.id.YSXG01_5);
		YSXG01_6 = (CheckBox) view.findViewById(R.id.YSXG01_6);

		XYZK01 = (RadioGroup) view.findViewById(R.id.XYZK01);
		XYZK01_1 = (RadioButton) view.findViewById(R.id.XYZK01_1);
		XYZK01_2 = (RadioButton) view.findViewById(R.id.XYZK01_2);
		XYZK01_3 = (RadioButton) view.findViewById(R.id.XYZK01_3);

		RXYL01 = (EditText) view.findViewById(R.id.RXYL01);
		XYNL01 = (EditText) view.findViewById(R.id.XYNL01);
		JYNL01 = (EditText) view.findViewById(R.id.JYNL01);

		YJPL01 = (RadioGroup) view.findViewById(R.id.YJPL01);
		YJPL01_1 = (RadioButton) view.findViewById(R.id.YJPL01_1);
		YJPL01_2 = (RadioButton) view.findViewById(R.id.YJPL01_2);
		YJPL01_3 = (RadioButton) view.findViewById(R.id.YJPL01_3);
		YJPL01_4 = (RadioButton) view.findViewById(R.id.YJPL01_4);
		RYJL01 = (EditText) view.findViewById(R.id.RYJL01);

		JJBZ01 = (RadioGroup) view.findViewById(R.id.JJBZ01);
		JJBZ01_1 = (RadioButton) view.findViewById(R.id.JJBZ01_1);
		JJBZ01_2 = (RadioButton) view.findViewById(R.id.JJBZ01_2);
		JJNL01 = (EditText) view.findViewById(R.id.JJNL01);
		YJNL01 = (EditText) view.findViewById(R.id.YJNL01);

		SFZJ01 = (RadioGroup) view.findViewById(R.id.SFZJ01);
		SFZJ01_1 = (RadioButton) view.findViewById(R.id.SFZJ01_1);
		SFZJ01_2 = (RadioButton) view.findViewById(R.id.SFZJ01_2);

		YJZL01_1 = (CheckBox) view.findViewById(R.id.YJZL01_1);
		YJZL01_2 = (CheckBox) view.findViewById(R.id.YJZL01_2);
		YJZL01_3 = (CheckBox) view.findViewById(R.id.YJZL01_3);
		YJZL01_4 = (CheckBox) view.findViewById(R.id.YJZL01_4);
		YJZL01_5 = (CheckBox) view.findViewById(R.id.YJZL01_5);

		YJZLBC = (EditText) view.findViewById(R.id.YJZLBC);
		WHYS01_et = (EditText) view.findViewById(R.id.WHYS01_et);
		WHGZ01 = (EditText) view.findViewById(R.id.WHGZ01);
		CYSJ01 = (EditText) view.findViewById(R.id.CYSJ01);
		ZFZL01 = (EditText) view.findViewById(R.id.ZFZL01);

		FHCS01 = (RadioGroup) view.findViewById(R.id.FHCS01);
		FHCS01_1 = (RadioButton) view.findViewById(R.id.FHCS01_1);
		FHCS01_2 = (RadioButton) view.findViewById(R.id.FHCS01_2);
		FHCS01_3 = (EditText) view.findViewById(R.id.FHCS01_3);
		FSWZ01 = (EditText) view.findViewById(R.id.FSWZ01);

		FHCS03 = (RadioGroup) view.findViewById(R.id.FHCS03);
		FHCS03_1 = (RadioButton) view.findViewById(R.id.FHCS03_1);
		FHCS03_2 = (RadioButton) view.findViewById(R.id.FHCS03_2);
		FHCS03_3 = (EditText) view.findViewById(R.id.FHCS03_3);
		WLYS01 = (EditText) view.findViewById(R.id.WLYS01);

		FHCS04 = (RadioGroup) view.findViewById(R.id.FHCS04);
		FHCS04_1 = (RadioButton) view.findViewById(R.id.FHCS04_1);
		FHCS04_2 = (RadioButton) view.findViewById(R.id.FHCS04_2);
		FHCS04_3 = (EditText) view.findViewById(R.id.FHCS04_3);
		HXWZ01 = (EditText) view.findViewById(R.id.HXWZ01);

		FHCS05 = (RadioGroup) view.findViewById(R.id.FHCS05);
		FHCS05_1 = (RadioButton) view.findViewById(R.id.FHCS05_1);
		FHCS05_2 = (RadioButton) view.findViewById(R.id.FHCS05_2);
		FHCS05_3 = (EditText) view.findViewById(R.id.FHCS05_3);
		QTZL01 = (EditText) view.findViewById(R.id.QTZL01);

		FHCS02 = (RadioGroup) view.findViewById(R.id.FHCS02);
		FHCS02_1 = (RadioButton) view.findViewById(R.id.FHCS02_1);
		FHCS02_2 = (RadioButton) view.findViewById(R.id.FHCS02_2);
		FHCS02_3 = (EditText) view.findViewById(R.id.FHCS02_3);
		YJZL01 = new CheckBox[] { YJZL01_1, YJZL01_2, YJZL01_3, YJZL01_4,
				YJZL01_5 };
		YSXG01 = new CheckBox[] { YSXG01_1, YSXG01_2, YSXG01_3, YSXG01_4,
				YSXG01_5, YSXG01_6 };
		setChoiceEditText(R.id.WHYS01_et, new String[] { "无", "有" }, null);
	}

	public void setContent2() {
		LifestySituation dataBean = mjktj_LifestySituation;
		if (dataBean == null) {
			return;
		}
		System.out.println("执行了jktj2的setcontent方法。");
		// 物理
		String DLPL01 = dataBean.getPhysicalExerciseFrequency();
		System.out.println("谁为空？" + DLPL01);
		if (!TextUtils.isEmpty(DLPL01)) {
			switch (DLPL01) {
			case "1":
				DLPL01_1.setChecked(true);
				break;
			case "2":
				DLPL01_2.setChecked(true);
				break;
			case "3":
				DLPL01_3.setChecked(true);
				break;
			case "4":
				DLPL01_4.setChecked(true);
				break;
			}
		}
		DLSJ01.setText(dataBean.getEveryPhysicalExerciseTime());
		DLSJ02.setText(dataBean.getInsistexercisetime());
		DLFS01.setText(dataBean.getExerciseStyle());

		// 饮食习惯 dietaryHabituploadBean.(ysxg01_sb.toString());
		String YSXG01 = dataBean.getDietaryHabit();
		if (!TextUtils.isEmpty(YSXG01)) {
			String[] ysxg01 = YSXG01.split(",");
			for (int i = 0; i < ysxg01.length; i++) {
				if (ysxg01[i].equals("1")) {
					YSXG01_1.setChecked(true);
				}
				if (ysxg01[i].equals("2")) {
					YSXG01_2.setChecked(true);
				}
				if (ysxg01[i].equals("3")) {
					YSXG01_3.setChecked(true);
				}
				if (ysxg01[i].equals("4")) {
					YSXG01_4.setChecked(true);
				}
				if (ysxg01[i].equals("5")) {
					YSXG01_5.setChecked(true);
				}
				if (ysxg01[i].equals("6")) {
					YSXG01_6.setChecked(true);
				}
			}
		}

		// 吸烟状况
		String XYZK01 = dataBean.getWehtherSmoke();
		if (!TextUtils.isEmpty(XYZK01)) {
			switch (XYZK01) {
			case "1":
				XYZK01_1.setChecked(true);
				break;
			case "2":
				XYZK01_2.setChecked(true);
				break;
			case "3":
				XYZK01_3.setChecked(true);
				break;
			}
		}

		// 开始吸烟年龄
		XYNL01.setText(dataBean.getBeginSmokeTime());
		// 戒烟年龄
		JYNL01.setText(dataBean.getStopSmokeTime());
		// 日吸烟量
		RXYL01.setText(dataBean.getSmokes());

		// 酒频率
		String YJPL01 = dataBean.getDrinkingFrequency();
		if (!TextUtils.isEmpty(YJPL01)) {
			switch (YJPL01) {
			case "1":
				YJPL01_1.setChecked(true);
				break;
			case "2":
				YJPL01_2.setChecked(true);
				break;
			case "3":
				YJPL01_3.setChecked(true);
				break;
			case "4":
				YJPL01_4.setChecked(true);
				break;
			}
		}
		// 日饮酒量
		RYJL01.setText(dataBean.getAlcoholConsumption());
		// 是否戒酒 whetherDrink
		String JJBZ01 = dataBean.getWhetherDrink();
		if (!TextUtils.isEmpty(JJBZ01)) {

			switch (JJBZ01) {
			case "1":
				JJBZ01_1.setChecked(true);
				break;
			case "2":
				JJBZ01_2.setChecked(true);
				break;
			}
		}
		// 戒酒年龄
		JJNL01.setText(dataBean.getStopDrinkingTime());
		// 开始饮酒（岁）
		YJNL01.setText(dataBean.getBeginToDrinkTime());
		// 一年内
		String SFZJ01 = dataBean.getIsDrink();
		if (!TextUtils.isEmpty(SFZJ01)) {

			switch (SFZJ01) {
			case "1":
				SFZJ01_1.setChecked(true);
				break;
			case "2":
				SFZJ01_2.setChecked(true);
				break;
			}
		}
		// 饮酒种类
		StringBuilder yjzl01_sb = new StringBuilder();
		for (int i = 0; i < YJZL01.length; i++) {
			if (YJZL01[i].isChecked()) {
				yjzl01_sb.append((i + 1) + ",");
				if (YJZL01_5.isChecked()) {
					dataBean.setDrinkOther(YJZLBC.getText().toString());

				}
			}
		}
		String yjzl = dataBean.getMainDrinkingVvarieties();
		if (!TextUtils.isEmpty(yjzl)) {
			String[] yjzl01 = yjzl.split(",");
			for (int i = 0; i < yjzl01.length; i++) {
				if (yjzl01[i].equals("1")) {
					YJZL01_1.setChecked(true);
				}
				if (yjzl01[i].equals("2")) {
					YJZL01_2.setChecked(true);
				}
				if (yjzl01[i].equals("3")) {
					YJZL01_3.setChecked(true);
				}
				if (yjzl01[i].equals("4")) {
					YJZL01_4.setChecked(true);
				}
				if (yjzl01[i].equals("9")) {
					YJZL01_5.setChecked(true);
					YJZLBC.setText(dataBean.getDrinkOther());
				}
			}
		}
		// 职业病危害
		String weihai = dataBean.getOccupational();
		if ("1".equals(weihai)) {
			WHYS01_et.setText("无");
		} else if ("2".equals("2")) {
			WHYS01_et.setText("有");
		}

		// 危害工种
		WHGZ01.setText(dataBean.getJobs());

		// 从业时间
		CYSJ01.setText(dataBean.getWorkTime());

		// 毒物种类-粉尘
		String FHCS01 = dataBean.getDustPro();
		if (!TextUtils.isEmpty(FHCS01)) {
			switch (FHCS01) {
			case "1":
				FHCS01_1.setChecked(true);
				break;
			case "2":
				FHCS01_2.setChecked(true);
				break;
			}
		}
		ZFZL01.setText(dataBean.getDust());
		FHCS01_3.setText(dataBean.getDustProDesc());
		// 放射
		FSWZ01.setText(dataBean.getRay());
		String rayPro = dataBean.getRayPro();
		if (!TextUtils.isEmpty(rayPro)) {

			if ("1".equals(rayPro)) {
				FHCS03_1.setChecked(true);
			} else if ("2".equals(rayPro)) {
				FHCS03_2.setChecked(true);
			}
		}
		FHCS03_3.setText(dataBean.getRayProDesc());
		// 物理
		WLYS01.setText(dataBean.getPhysicalFactor());
		String pf = dataBean.getPhysicalFactorPro();
		if (!TextUtils.isEmpty(pf)) {

			if ("1".equals(pf)) {
				FHCS04_1.setChecked(true);
			} else if ("2".equals(pf)) {
				FHCS04_2.setChecked(true);
			}
		}
		FHCS04_3.setText(dataBean.getPhysicalFactorProDesc());
		// 化学
		HXWZ01.setText(dataBean.getChemicals());
		String cs = dataBean.getChemicalsPro();
		if (!TextUtils.isEmpty(cs)) {
			if ("1".equals(cs)) {
				FHCS05_1.setChecked(true);
			} else if ("2".equals(cs)) {
				FHCS05_2.setChecked(true);
			}
		}
		FHCS05_3.setText(dataBean.getChemicalsProDesc());
		// 其他

		QTZL01.setText(dataBean.getOther());
		String op = dataBean.getOtherPro();
		if (!TextUtils.isEmpty(op)) {
			if ("1".equals(op)) {
				FHCS02_1.setChecked(true);
			} else if ("2".equals(op)) {
				FHCS02_2.setChecked(true);
			}
		}
		FHCS02_3.setText(dataBean.getOtherProDesc());
	}

	public LifestySituation getUpload2() {
		LifestySituation uploadBean = mjktj_LifestySituation;
		if (DLPL01_1.isChecked()) {
			uploadBean.setPhysicalExerciseFrequency("1");
		} else if (DLPL01_2.isChecked()) {
			uploadBean.setPhysicalExerciseFrequency("2");
		} else if (DLPL01_3.isChecked()) {
			uploadBean.setPhysicalExerciseFrequency("3");
		} else if (DLPL01_4.isChecked()) {
			uploadBean.setPhysicalExerciseFrequency("4");
		}

		uploadBean.setEveryPhysicalExerciseTime(DLSJ01.getText().toString());
		uploadBean.setInsistexercisetime(DLSJ02.getText().toString());
		uploadBean.setExerciseStyle(DLFS01.getText().toString());

		// 饮食习惯 dietaryHabit
		StringBuilder ysxg01_sb = new StringBuilder();
		for (int i = 0; i < YSXG01.length; i++) {
			if (YSXG01[i].isChecked()) {
				ysxg01_sb.append((i + 1) + ",");
			}
		}
		uploadBean.setDietaryHabit(ysxg01_sb.toString());

		// 吸烟状况
		if (XYZK01_1.isChecked()) {
			uploadBean.setWehtherSmoke("1");
		} else if (XYZK01_2.isChecked()) {
			uploadBean.setWehtherSmoke("2");
		} else {
			uploadBean.setWehtherSmoke("3");
		}
		// 开始吸烟年龄
		uploadBean.setBeginSmokeTime(XYNL01.getText().toString());
		// 戒烟年龄
		uploadBean.setStopSmokeTime(JYNL01.getText().toString());
		// 日吸烟量
		uploadBean.setSmokes(RXYL01.getText().toString());
		// 酒频率
		if (YJPL01_1.isChecked()) {
			uploadBean.setDrinkingFrequency("1");
		} else if (YJPL01_2.isChecked()) {
			uploadBean.setDrinkingFrequency("2");
		} else if (YJPL01_3.isChecked()) {
			uploadBean.setDrinkingFrequency("3");
		} else if (YJPL01_4.isChecked()) {
			uploadBean.setDrinkingFrequency("4");
		}
		// 日饮酒量
		uploadBean.setAlcoholConsumption(RYJL01.getText().toString());

		// 是否戒酒 whetherDrink
		if (JJBZ01_1.isChecked()) {
			uploadBean.setWhetherDrink("1");
		} else if (JJBZ01_2.isChecked()) {
			uploadBean.setWhetherDrink("2");
		}

		// 戒酒年龄
		uploadBean.setStopDrinkingTime(JJNL01.getText().toString());
		// 开始饮酒（岁）
		uploadBean.setBeginToDrinkTime(YJNL01.getText().toString());

		// 一年内
		if (SFZJ01_1.isChecked()) {
			uploadBean.setIsDrink("1");
		}
		if (SFZJ01_2.isChecked()) {
			uploadBean.setIsDrink("2");
		}
		// 饮酒种类
		StringBuilder yjzl01_sb = new StringBuilder();
		for (int i = 0; i < YJZL01.length - 1; i++) {
			if (YJZL01[i].isChecked()) {
				if (YJZL01_5.isChecked()) {
					uploadBean.setDrinkOther(YJZLBC.getText().toString());
					yjzl01_sb.append(9 + ",");
				}
				yjzl01_sb.append((i + 1) + ",");
			}
		}
		uploadBean.setMainDrinkingVvarieties(yjzl01_sb.toString());
		// 职业病危害
		String weihai = WHYS01_et.getText().toString();
		if ("无".equals(weihai)) {
			uploadBean.setOccupational("1");
		} else if ("有".equals(weihai)) {
			uploadBean.setOccupational("2");
		}

		// 危害工种
		uploadBean.setJobs(WHGZ01.getText().toString());

		// 从业时间
		uploadBean.setWorkTime(CYSJ01.getText().toString());

		// 毒物种类-粉尘
		uploadBean.setDust(ZFZL01.getText().toString());
		if (FHCS01_1.isChecked()) {
			uploadBean.setDustPro("1");
		} else if (FHCS01_2.isChecked()) {
			uploadBean.setDustPro("2");
		}
		uploadBean.setDustProDesc(FHCS01_3.getText().toString());
		// 放射
		uploadBean.setRay(FSWZ01.getText().toString());
		if (FHCS03_1.isChecked()) {
			uploadBean.setRayPro("1");
		} else if (FHCS03_2.isChecked()) {
			uploadBean.setRayPro("2");
		}
		uploadBean.setRayProDesc(FHCS03_3.getText().toString());
		// 物理
		uploadBean.setPhysicalFactor(WLYS01.getText().toString());
		if (FHCS04_1.isChecked()) {
			uploadBean.setPhysicalFactorPro("1");
		} else if (FHCS04_2.isChecked()) {
			uploadBean.setPhysicalFactorPro("2");
		}
		uploadBean.setPhysicalFactorProDesc(FHCS04_3.getText().toString());
		// 化学
		uploadBean.setChemicals(HXWZ01.getText().toString());
		if (FHCS05_1.isChecked()) {
			uploadBean.setChemicalsPro("1");
		}
		if (FHCS05_2.isChecked()) {
			uploadBean.setChemicalsPro("2");
		}
		uploadBean.setChemicalsProDesc(FHCS05_3.getText().toString());
		// 其他
		uploadBean.setOther(QTZL01.getText().toString());
		if (FHCS02_1.isChecked()) {
			uploadBean.setOtherPro("1");
		}
		if (FHCS02_2.isChecked()) {
			uploadBean.setOtherPro("2");
		}
		uploadBean.setOtherProDesc(FHCS02_3.getText().toString());
		return uploadBean;
	}

	private void initView3(Activity view) {
		KC0001 = (RadioGroup) view.findViewById(R.id.KC0001);
		hongrun = (RadioButton) view.findViewById(R.id.hongrun);
		cangbai = (RadioButton) view.findViewById(R.id.cangbai);
		fajian = (RadioButton) view.findViewById(R.id.fajian);
		junlie = (RadioButton) view.findViewById(R.id.junlie);
		paozhen = (RadioButton) view.findViewById(R.id.paozhen);
		CL0001 = (RadioGroup) view.findViewById(R.id.CL0001);
		CL0001_Q = (CheckBox) view.findViewById(R.id.CL0001_Q);
		CL0001_Z = (CheckBox) view.findViewById(R.id.CL0001_Z);
		CL0001_J = (CheckBox) view.findViewById(R.id.CL0001_J);
		CL0001_Y = (CheckBox) view.findViewById(R.id.CL0001_Y);
		jktj3_qcwz = (SingleChoiceEditText) view.findViewById(R.id.jktj3_qcwz);
		jktj3_qvcwz = (SingleChoiceEditText) view
				.findViewById(R.id.jktj3_qvcwz);
		jktj3_ycwz = (SingleChoiceEditText) view.findViewById(R.id.jktj3_ycwz);
		jktj3_qcwz.setFixItems(JKTJContants.CHILIE.yuchi);
		jktj3_qvcwz.setFixItems(JKTJContants.CHILIE.yuchi);
		jktj3_ycwz.setFixItems(JKTJContants.CHILIE.yuchi);
		YB0001 = (RadioGroup) view.findViewById(R.id.YB0001);
		YB0001_WCX = (RadioButton) view.findViewById(R.id.YB0001_WCX);
		YB0001_CX = (RadioButton) view.findViewById(R.id.YB0001_CX);
		YB0001_LB = (RadioButton) view.findViewById(R.id.YB0001_LB);
		ZYSL01 = (EditText) view.findViewById(R.id.ZYSL01);
		YYSL01 = (EditText) view.findViewById(R.id.YYSL01);
		ZYJZ01 = (EditText) view.findViewById(R.id.ZYJZ01);
		YYJZ01 = (EditText) view.findViewById(R.id.YYJZ01);
		TL0001 = (RadioGroup) view.findViewById(R.id.TL0001);
		TL0001_TJ = (RadioButton) view.findViewById(R.id.TL0001_TJ);
		TL0001_TBJ = (RadioButton) view.findViewById(R.id.TL0001_TBJ);
		YDNL01 = (RadioGroup) view.findViewById(R.id.YDNL01);
		YDNL01_KWC = (RadioButton) view.findViewById(R.id.YDNL01_KWC);
		YDNL01_WFWC = (RadioButton) view.findViewById(R.id.YDNL01_WFWC);
		CL0001_ = new CheckBox[] { CL0001_Z, CL0001_Q, CL0001_J, CL0001_Y };
		for (int i = 0; i < CL0001_.length; i++) {
			CL0001_[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int j = 1; j < CL0001_.length; j++) {
						if (CL0001_Z == v && CL0001_Z.isChecked()) {
							CL0001_[j].setChecked(false);
						} else {
							CL0001_[0].setChecked(false);
						}
					}
				}
			});
		}
	}

	public void setContent3() {
		AccessoryExamination uploadBean = mjktj_AccessoryExamination;
		if (uploadBean == null) {
			return;
		}
		// 口唇
		String KC0001 = uploadBean.getLip();
		if (!TextUtils.isEmpty(KC0001)) {
			switch (KC0001) {
			case "1":
				hongrun.setChecked(true);
				break;
			case "2":
				cangbai.setChecked(true);
				break;
			case "3":
				fajian.setChecked(true);
				break;
			case "4":
				junlie.setChecked(true);
				break;
			case "5":
				paozhen.setChecked(true);
				break;
			}
		}
		// 齿列
		String CL0001_1 = uploadBean.getDenture();
		if (!TextUtils.isEmpty(CL0001_1)) {
			String[] grzzxh = CL0001_1.split(",");
			for (int i = 0; i < grzzxh.length; i++) {
				if (!TextUtils.isEmpty(grzzxh[i])) {
					CL0001_[Integer.valueOf(grzzxh[i]) - 1].setChecked(true);
				}
			}
		}
		// 缺齿位置
		jktj3_qcwz.setText(uploadBean.getHypodontia());
		// 龋齿位置
		jktj3_qvcwz.setText(uploadBean.getDecay());
		// 义齿位置
		jktj3_ycwz.setText(uploadBean.getFalsethooh());
		String YB0001 = uploadBean.getPharyngeal();
		if (!TextUtils.isEmpty(YB0001)) {

			switch (YB0001) {
			case "1":
				YB0001_WCX.setChecked(true);
				break;
			case "2":
				YB0001_CX.setChecked(true);
				break;
			case "3":
				YB0001_LB.setChecked(true);
				break;
			}
		}
		// 左眼视力
		ZYSL01.setText(uploadBean.getLeftEye());
		// 右眼视力
		YYSL01.setText(uploadBean.getRightEye());
		// (矫正视力:左眼 "
		ZYJZ01.setText(uploadBean.getRecLeftEye());
		// 右眼
		YYJZ01.setText(uploadBean.getRecRightEye());
		// 听力
		String TL0001 = uploadBean.getHearing();
		if (!TextUtils.isEmpty(TL0001)) {
			switch (TL0001) {
			case "1":
				TL0001_TJ.setChecked(true);
				break;
			case "2":
				TL0001_TBJ.setChecked(true);
				break;
			}
		}
		// 运动功能
		String YDNL01 = uploadBean.getMotion();
		if (!TextUtils.isEmpty(YDNL01)) {

			switch (YDNL01) {
			case "1":
				YDNL01_KWC.setChecked(true);
				break;
			case "2":
				YDNL01_WFWC.setChecked(true);
				break;
			}
		}
	}

	public AccessoryExamination getUpload3() {
		System.out.println("jktj3执行了getupload了吗");
		AccessoryExamination uploadBean = mjktj_AccessoryExamination;
		// 口唇
		if (hongrun.isChecked()) {
			uploadBean.setLip("1");
		}
		if (cangbai.isChecked()) {
			uploadBean.setLip("2");
		}
		if (fajian.isChecked()) {
			uploadBean.setLip("3");
		}
		if (junlie.isChecked()) {
			uploadBean.setLip("4");
		}
		if (paozhen.isChecked()) {
			uploadBean.setLip("5");
		}
		// 齿列
		StringBuilder grzz_sb = new StringBuilder();
		for (int j = 0; j < CL0001_.length; j++) {
			if (CL0001_[j].isChecked()) {
				grzz_sb.append((j + 1) + ",");
			}
		}
		uploadBean.setDenture(grzz_sb.toString());
		// 缺齿位置
		uploadBean.setHypodontia(jktj3_qcwz.getText().toString());
		// 龋齿位置
		uploadBean.setDecay(jktj3_qvcwz.getText().toString());
		// 义齿位置
		uploadBean.setFalsethooh(jktj3_ycwz.getText().toString());
		if (YB0001_WCX.isChecked()) {
			uploadBean.setPharyngeal("1");
		}
		if (YB0001_CX.isChecked()) {
			uploadBean.setPharyngeal("2");
		}
		if (YB0001_LB.isChecked()) {
			uploadBean.setPharyngeal("3");
		}
		// 左眼视力
		uploadBean.setLeftEye(ZYSL01.getText().toString());
		// 右眼视力
		uploadBean.setRightEye(YYSL01.getText().toString());
		// (矫正视力:左眼 "
		uploadBean.setRecLeftEye(ZYJZ01.getText().toString());
		// 右眼
		uploadBean.setRecRightEye(YYJZ01.getText().toString());
		// 听力
		if (TL0001_TJ.isChecked()) {
			uploadBean.setHearing("1");
		}
		if (TL0001_TBJ.isChecked()) {
			uploadBean.setHearing("2");
		}
		// 运动功能
		if (YDNL01_KWC.isChecked()) {
			uploadBean.setMotion("1");
		}
		if (YDNL01_WFWC.isChecked()) {
			uploadBean.setMotion("2");
		}
		// 转到第五页才有血红蛋白。
		return uploadBean;

	}

	private void initView4(Activity view) {
		YDQK01 = (RadioGroup) view.findViewById(R.id.YDQK01);
		YDQK01_1 = (RadioButton) view.findViewById(R.id.YDQK01_1);
		YDQK01_2 = (RadioButton) view.findViewById(R.id.YDQK01_2);
		YDQK01_3 = (EditText) view.findViewById(R.id.YDQK01_3);
		//
		PFQK01 = (RadioGroup) view.findViewById(R.id.PFQK01);
		PFQK01_1 = (RadioButton) view.findViewById(R.id.PFQK01_1);
		PFQK01_2 = (RadioButton) view.findViewById(R.id.PFQK01_2);
		PFQK01_3 = (RadioButton) view.findViewById(R.id.PFQK01_3);
		PFQK01_4 = (RadioButton) view.findViewById(R.id.PFQK01_4);
		PFQK01_5 = (RadioButton) view.findViewById(R.id.PFQK01_5);
		PFQK01_6 = (RadioButton) view.findViewById(R.id.PFQK01_6);
		PFQK01_7 = (RadioButton) view.findViewById(R.id.PFQK01_7);
		PFQK01_8 = (EditText) view.findViewById(R.id.PFQK01_8);
		//
		GMQK01 = (RadioGroup) view.findViewById(R.id.GMQK01);
		GMQK01_1 = (RadioButton) view.findViewById(R.id.GMQK01_1);
		GMQK01_2 = (RadioButton) view.findViewById(R.id.GMQK01_2);
		GMQK01_3 = (RadioButton) view.findViewById(R.id.GMQK01_3);
		GMQK01_4 = (RadioButton) view.findViewById(R.id.GMQK01_4);
		GMQK01_5 = (EditText) view.findViewById(R.id.GMQK01_5);
		//
		LBQK01 = (RadioGroup) view.findViewById(R.id.LBQK01);
		LBQK01_1 = (RadioButton) view.findViewById(R.id.LBQK01_1);
		LBQK01_2 = (RadioButton) view.findViewById(R.id.LBQK01_2);
		LBQK01_3 = (RadioButton) view.findViewById(R.id.LBQK01_3);
		LBQK01_4 = (RadioButton) view.findViewById(R.id.LBQK01_4);
		LBQK01_5 = (EditText) view.findViewById(R.id.LBQK01_5);
		//
		TZX001 = (RadioGroup) view.findViewById(R.id.TZX001);
		TZX001_1 = (RadioButton) view.findViewById(R.id.TZX001_1);
		TZX001_2 = (RadioButton) view.findViewById(R.id.TZX001_2);
		//
		HXY001 = (RadioGroup) view.findViewById(R.id.HXY001);
		HXY001_1 = (RadioButton) view.findViewById(R.id.HXY001_1);
		HXY001_2 = (RadioButton) view.findViewById(R.id.HXY001_2);
		HXY001_3 = (EditText) view.findViewById(R.id.HXY001_3);
		//
		LYQK01 = (RadioGroup) view.findViewById(R.id.LYQK01);
		LYQK01_1 = (RadioButton) view.findViewById(R.id.LYQK01_1);
		LYQK01_2 = (RadioButton) view.findViewById(R.id.LYQK01_2);
		LYQK01_3 = (RadioButton) view.findViewById(R.id.LYQK01_3);
		LYQK01_4 = (RadioButton) view.findViewById(R.id.LYQK01_4);
		LYQK01_5 = (EditText) view.findViewById(R.id.LYQK01_5);
		//
		XLCS01 = (EditText) view.findViewById(R.id.XLCS01);
		XLQK01 = (RadioGroup) view.findViewById(R.id.XLQK01);
		XLQK01_1 = (RadioButton) view.findViewById(R.id.XLQK01_1);
		XLQK01_2 = (RadioButton) view.findViewById(R.id.XLQK01_2);
		XLQK01_3 = (RadioButton) view.findViewById(R.id.XLQK01_3);
		//
		ZYQK01 = (RadioGroup) view.findViewById(R.id.ZYQK01);
		ZYQK01_1 = (RadioButton) view.findViewById(R.id.ZYQK01_1);
		ZYQK01_2 = (RadioButton) view.findViewById(R.id.ZYQK01_2);
		ZYQK01_3 = (EditText) view.findViewById(R.id.ZYQK01_3);
		//
		FBYT01 = (RadioGroup) view.findViewById(R.id.FBYT01);
		FBYT01_1 = (RadioButton) view.findViewById(R.id.FBYT01_1);
		FBYT01_2 = (RadioButton) view.findViewById(R.id.FBYT01_2);
		FBYT01_3 = (EditText) view.findViewById(R.id.FBYT01_3);
		//
		FBBK01 = (RadioGroup) view.findViewById(R.id.FBBK01);
		FBBK01_1 = (RadioButton) view.findViewById(R.id.FBBK01_1);
		FBBK01_2 = (RadioButton) view.findViewById(R.id.FBBK01_2);
		FBBK01_3 = (EditText) view.findViewById(R.id.FBBK01_3);
		//
		FBGD01 = (RadioGroup) view.findViewById(R.id.FBGD01);
		FBGD01_1 = (RadioButton) view.findViewById(R.id.FBGD01_1);
		FBGD01_2 = (RadioButton) view.findViewById(R.id.FBGD01_2);
		FBGD01_3 = (EditText) view.findViewById(R.id.FBGD01_3);
		//
		FBPD01 = (RadioGroup) view.findViewById(R.id.FBPD01);
		FBPD01_1 = (RadioButton) view.findViewById(R.id.FBPD01_1);
		FBPD01_2 = (RadioButton) view.findViewById(R.id.FBPD01_2);
		FBPD01_3 = (EditText) view.findViewById(R.id.FBPD01_3);
		//
		FBZY01 = (RadioGroup) view.findViewById(R.id.FBZY01);
		FBZY01_1 = (RadioButton) view.findViewById(R.id.FBZY01_1);
		FBZY01_2 = (RadioButton) view.findViewById(R.id.FBZY01_2);
		FBZY01_3 = (EditText) view.findViewById(R.id.FBZY01_3);
		//
		XZSZ01 = (RadioGroup) view.findViewById(R.id.XZSZ01);
		XZSZ01_1 = (RadioButton) view.findViewById(R.id.XZSZ01_1);
		XZSZ01_2 = (RadioButton) view.findViewById(R.id.XZSZ01_2);
		XZSZ01_3 = (RadioButton) view.findViewById(R.id.XZSZ01_3);
		XZSZ01_4 = (RadioButton) view.findViewById(R.id.XZSZ01_4);
		//
		ZBDMBD = (RadioGroup) view.findViewById(R.id.ZBDMBD);
		ZBDMBD_1 = (RadioButton) view.findViewById(R.id.ZBDMBD_1);
		ZBDMBD_2 = (RadioButton) view.findViewById(R.id.ZBDMBD_2);
		ZBDMBD_3 = (RadioButton) view.findViewById(R.id.ZBDMBD_3);
		ZBDMBD_4 = (RadioButton) view.findViewById(R.id.ZBDMBD_4);
		//
		GMZZ01 = (RadioGroup) view.findViewById(R.id.GMZZ01);
		GMZZ01_1 = (RadioButton) view.findViewById(R.id.GMZZ01_1);
		GMZZ01_2 = (RadioButton) view.findViewById(R.id.GMZZ01_2);
		GMZZ01_3 = (RadioButton) view.findViewById(R.id.GMZZ01_3);
		GMZZ01_4 = (RadioButton) view.findViewById(R.id.GMZZ01_4);
		GMZZ01_5 = (RadioButton) view.findViewById(R.id.GMZZ01_5);
		GMZZ01_6 = (EditText) view.findViewById(R.id.GMZZ01_6);
		gmzz01 = new RadioButton[] { GMZZ01_1, GMZZ01_2, GMZZ01_3, GMZZ01_4,
				GMZZ01_5 };
		for (int i = 0; i < gmzz01.length; i++) {
			gmzz01[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int j = 1; j < gmzz01.length; j++) {
						if (GMZZ01_1 == v && GMZZ01_1.isChecked()) {
							gmzz01[j].setChecked(false);
						} else {
							gmzz01[0].setChecked(false);
						}
					}
				}
			});
		}

		// 乳腺
		RX0001 = (RadioGroup) view.findViewById(R.id.RX0001);
		RX0001_1 = (RadioButton) view.findViewById(R.id.RX0001_1);
		RX0001_2 = (RadioButton) view.findViewById(R.id.RX0001_2);
		RX0001_3 = (RadioButton) view.findViewById(R.id.RX0001_3);
		RX0001_4 = (RadioButton) view.findViewById(R.id.RX0001_4);
		RX0001_5 = (RadioButton) view.findViewById(R.id.RX0001_5);
		RX0001_6 = (EditText) view.findViewById(R.id.RX0001_6);
		rx0001 = new RadioButton[] { RX0001_1, RX0001_2, RX0001_3, RX0001_4,
				RX0001_5 };
		for (int i = 0; i < rx0001.length; i++) {
			rx0001[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int j = 1; j < rx0001.length; j++) {
						if (RX0001_1 == v && RX0001_1.isChecked()) {
							rx0001[j].setChecked(false);
						} else {
							rx0001[0].setChecked(false);
						}
					}
				}
			});
		}

		// 外阴
		FKWY01 = (RadioGroup) view.findViewById(R.id.FKWY01);
		FKWY01_1 = (RadioButton) view.findViewById(R.id.FKWY01_1);
		FKWY01_2 = (RadioButton) view.findViewById(R.id.FKWY01_2);
		FKWY01_3 = (EditText) view.findViewById(R.id.FKWY01_3);

		// 阴道
		FKYD01 = (RadioGroup) view.findViewById(R.id.FKYD01);
		FKYD01_1 = (RadioButton) view.findViewById(R.id.FKYD01_1);
		FKYD01_2 = (RadioButton) view.findViewById(R.id.FKYD01_2);
		FKYD01_3 = (EditText) view.findViewById(R.id.FKYD01_3);

		// 宫颈
		FKGJ01 = (RadioGroup) view.findViewById(R.id.FKGJ01);
		FKGJ01_1 = (RadioButton) view.findViewById(R.id.FKGJ01_1);
		FKGJ01_2 = (RadioButton) view.findViewById(R.id.FKGJ01_2);
		FKGJ01_3 = (EditText) view.findViewById(R.id.FKGJ01_3);

		// 宫体
		FKGT01 = (RadioGroup) view.findViewById(R.id.FKGT01);
		FKGT01_1 = (RadioButton) view.findViewById(R.id.FKGT01_1);
		FKGT01_2 = (RadioButton) view.findViewById(R.id.FKGT01_2);
		FKGT01_3 = (EditText) view.findViewById(R.id.FKGT01_3);

		// 附件
		FKFJ01 = (RadioGroup) view.findViewById(R.id.FKFJ01);
		FKFJ01_1 = (RadioButton) view.findViewById(R.id.FKFJ01_1);
		FKFJ01_2 = (RadioButton) view.findViewById(R.id.FKFJ01_2);
		FKFJ01_3 = (EditText) view.findViewById(R.id.FKFJ01_3);

		// 查体其他
		CTQT01 = (EditText) view.findViewById(R.id.CTQT01);

	}

	public void setContent4() {
		// 查体
		Examination uploadBean = mjktj_Examination;
		if (uploadBean == null) {
			return;
		}
		String YDQK01 = uploadBean.getFundus();
		switch (YDQK01) {
		case "1":
			YDQK01_1.setChecked(true);
			break;
		case "2":
			YDQK01_2.setChecked(true);
			YDQK01_3.setText(uploadBean.getFundusDesc());
			break;
		}
		// 皮肤
		String PFQK01 = uploadBean.getSkin();
		if (!TextUtils.isEmpty(PFQK01)) {

			switch (PFQK01) {
			case "1":
				PFQK01_1.setChecked(true);
				break;
			case "2":
				PFQK01_2.setChecked(true);
				break;
			case "3":
				PFQK01_3.setChecked(true);
				break;
			case "4":
				PFQK01_4.setChecked(true);
				break;
			case "5":
				PFQK01_5.setChecked(true);
				break;
			case "6":
				PFQK01_6.setChecked(true);
				break;
			case "7":
				PFQK01_7.setChecked(true);
				PFQK01_8.setText(uploadBean.getSkinDesc());
				break;
			}
		}
		// 巩膜
		String GMQK01 = uploadBean.getSclera();
		if (!TextUtils.isEmpty(GMQK01)) {

			switch (GMQK01) {
			case "1":
				GMQK01_1.setChecked(true);
				break;
			case "2":
				GMQK01_2.setChecked(true);
				break;
			case "3":
				GMQK01_3.setChecked(true);
				break;
			case "4":
				GMQK01_4.setChecked(true);
				GMQK01_5.setText(uploadBean.getScleraDesc());
				break;
			}
		}
		// 淋巴结
		String LBQK01 = uploadBean.getLymphnodes();
		if (!TextUtils.isEmpty(LBQK01)) {
			switch (LBQK01) {
			case "1":
				LBQK01_1.setChecked(true);
				break;
			case "2":
				LBQK01_2.setChecked(true);
				break;
			case "3":
				LBQK01_3.setChecked(true);
				break;
			case "4":
				LBQK01_4.setChecked(true);
				LBQK01_5.setText(uploadBean.getLymphnodesDesc());
				break;
			}
		}

		// 桶状胸
		String TZX001 = uploadBean.getBarrelChest();
		if (!TextUtils.isEmpty(TZX001)) {
			switch (TZX001) {
			case "1":
				TZX001_1.setChecked(true);
				break;
			case "2":
				TZX001_2.setChecked(true);
				break;
			}
		}
		// breathSound呼吸音
		String HXY001 = uploadBean.getBreathSound();
		if (!TextUtils.isEmpty(HXY001)) {
			switch (HXY001) {
			case "1":
				HXY001_1.setChecked(true);
				break;
			case "2":
				HXY001_2.setChecked(true);
				HXY001_3.setText(uploadBean.getBreathSoundDesc());
				break;
			}
		}
		// rales啰音
		String LYQK01 = uploadBean.getRales();
		if (!TextUtils.isEmpty(LYQK01)) {
			switch (LYQK01) {
			case "1":
				LYQK01_1.setChecked(true);
				break;
			case "2":
				LYQK01_2.setChecked(true);
				break;
			case "3":
				LYQK01_3.setChecked(true);
				break;
			case "4":
				LYQK01_4.setChecked(true);
				LYQK01_5.setText(uploadBean.getRalesDesc());
				break;
			}
		}
		// 心率次数
		XLCS01.setText(uploadBean.getHeartRate());
		// 心律
		String XLQK01 = uploadBean.getRhythm();
		if (!TextUtils.isEmpty(XLQK01)) {
			switch (XLQK01) {
			case "1":
				XLQK01_1.setChecked(true);
				break;
			case "2":
				XLQK01_2.setChecked(true);
				break;
			case "3":
				XLQK01_3.setChecked(true);
				break;
			}
		}
		// 心脏杂音
		String ZYQK01 = uploadBean.getHeartMurmur();
		if (!TextUtils.isEmpty(ZYQK01)) {
			switch (ZYQK01) {
			case "1":
				ZYQK01_1.setChecked(true);
				break;
			case "2":
				ZYQK01_2.setChecked(true);
				ZYQK01_3.setText(uploadBean.getHeartMurmurDesc());
				break;
			}
		}

		// abdominAltend腹部压痛
		String FBYT01 = uploadBean.getAbdominAltend();
		if (!TextUtils.isEmpty(FBYT01)) {
			switch (FBYT01) {
			case "1":
				FBYT01_1.setChecked(true);
				break;
			case "2":
				FBYT01_2.setChecked(true);
				FBYT01_3.setText(uploadBean.getAbdominAltendDesc());
				break;
			}
		}

		// adbominAlmass腹部包块
		String FBBK01 = uploadBean.getAdbominAlmass();
		if (!TextUtils.isEmpty(FBBK01)) {
			switch (FBBK01) {
			case "1":
				FBBK01_1.setChecked(true);
				break;
			case "2":
				FBBK01_2.setChecked(true);
				FBBK01_3.setText(uploadBean.getAdbominAlmassDesc());
				break;
			}
		}
		// liverBig肝大
		String FBGD01 = uploadBean.getLiverBig();
		if (!TextUtils.isEmpty(FBGD01)) {
			switch (FBGD01) {
			case "1":
				FBGD01_1.setChecked(true);
				break;
			case "2":
				FBGD01_2.setChecked(true);
				FBGD01_3.setText(uploadBean.getLiverBigDesc());
				break;
			}
		}
		// splenomegaly脾大
		String FBPD01 = uploadBean.getSplenomegaly();
		if (!TextUtils.isEmpty(FBPD01)) {
			switch (FBPD01) {
			case "1":
				FBPD01_1.setChecked(true);
				break;
			case "2":
				FBPD01_2.setChecked(true);
				FBPD01_3.setText(uploadBean.getSplenomegalyDesc());
				break;
			}
		}

		// <dullness>腹部移动性浊音<
		String FBZY01 = uploadBean.getDullness();
		if (!TextUtils.isEmpty(FBZY01)) {
			switch (FBZY01) {
			case "1":
				FBZY01_1.setChecked(true);
				break;
			case "2":
				FBZY01_2.setChecked(true);
				FBZY01_3.setText(uploadBean.getDullnessDesc());
				break;
			}
		}

		// 下肢水肿
		String XZSZ01 = uploadBean.getEdema();
		if (!TextUtils.isEmpty(XZSZ01)) {
			switch (XZSZ01) {
			case "1":
				XZSZ01_1.setChecked(true);
				break;
			case "2":
				XZSZ01_2.setChecked(true);
				break;
			case "3":
				XZSZ01_3.setChecked(true);
				break;
			case "4":
				XZSZ01_4.setChecked(true);
				break;
			}
		}

		// footPulse足背动脉搏动
		String ZBDMBD = uploadBean.getFootPulse();
		if (!TextUtils.isEmpty(ZBDMBD)) {
			switch (ZBDMBD) {
			case "1":
				ZBDMBD_1.setChecked(true);
				break;
			case "2":
				ZBDMBD_2.setChecked(true);
				break;
			case "3":
				ZBDMBD_3.setChecked(true);
				break;
			case "4":
				ZBDMBD_4.setChecked(true);
				break;
			}
		}

		// dre肛门指诊
		String GMZZ01 = uploadBean.getDre();
		if (GMZZ01 != null) {
			String[] grzzxh = GMZZ01.split(",");
			for (int i = 0; i < grzzxh.length; i++) {
				if (!TextUtils.isEmpty(grzzxh[i])) {
					gmzz01[Integer.valueOf(grzzxh[i]) - 1].setChecked(true);
				}
				if (!TextUtils.isEmpty(grzzxh[i])
						&& Integer.valueOf(grzzxh[i]) == 5
						&& gmzz01[4].isChecked()) {
					GMZZ01_6.setText(uploadBean.getDreDesc());
				}
			}
		}

		// ***********************乳腺*******************************
		String RX0001 = uploadBean.getBreast();
		if (RX0001 != null) {
			String[] rx0001_ = RX0001.split(",");
			for (int i = 0; i < rx0001_.length; i++) {
				if (!TextUtils.isEmpty(rx0001_[i])) {
					rx0001[Integer.valueOf(rx0001_[i]) - 1].setChecked(true);
				}
				if (!TextUtils.isEmpty(rx0001_[i])
						&& Integer.valueOf(rx0001_[i]) == 5
						&& rx0001[4].isChecked()) {
					RX0001_6.setText(uploadBean.getBreastDesc());
				}
			}
		}

		// **************************外阴****************************
		String FKWY01 = uploadBean.getVulva();
		if (!TextUtils.isEmpty(FKWY01)) {
			switch (FKWY01) {
			case "1":
				FKWY01_1.setChecked(true);
				break;

			case "2":
				FKWY01_2.setChecked(true);
				FKWY01_3.setText(uploadBean.getVulvaDesc());
				break;
			}
		}

		// **************************阴道****************************
		String FKYD01 = uploadBean.getVaginal();
		if (!TextUtils.isEmpty(FKYD01)) {
			switch (FKYD01) {
			case "1":
				FKYD01_1.setChecked(true);
				break;

			case "2":
				FKYD01_2.setChecked(true);
				FKYD01_3.setText(uploadBean.getVaginalDesc());
				break;
			}
		}
		// **************************宫颈****************************
		String FKGJ01 = uploadBean.getCervix();
		if (!TextUtils.isEmpty(FKGJ01)) {
			switch (FKGJ01) {
			case "1":
				FKGJ01_1.setChecked(true);
				break;

			case "2":
				FKGJ01_2.setChecked(true);
				FKGJ01_3.setText(uploadBean.getCervixDesc());
				break;
			}
		}

		// **************************宫体****************************
		String FKGT01 = uploadBean.getPalace();
		if (!TextUtils.isEmpty(FKGT01)) {
			switch (FKGT01) {
			case "1":
				FKGT01_1.setChecked(true);
				break;

			case "2":
				FKGT01_2.setChecked(true);
				FKGT01_3.setText(uploadBean.getPalaceDesc());
				break;
			}
		}

		// **************************附件****************************
		String FKFJ01 = uploadBean.getAttachment();
		if (!TextUtils.isEmpty(FKFJ01)) {
			switch (FKFJ01) {
			case "1":
				FKFJ01_1.setChecked(true);
				break;
			case "2":
				FKFJ01_2.setChecked(true);
				FKFJ01_3.setText(uploadBean.getAttachmentDesc());
				break;
			}
		}
		CTQT01.setText(uploadBean.getTjother());
	}

	public Examination getUpload4() {
		System.out.println("执行了jktj4的onpause");
		// 查体
		Examination uploadBean = mjktj_Examination;
		if (YDQK01_1.isChecked()) {
			uploadBean.setFundus("1");
		}
		if (YDQK01_2.isChecked()) {
			uploadBean.setFundus("2");
			uploadBean.setFundusDesc(YDQK01_3.getText().toString());
		}
		// 皮肤
		if (PFQK01_1.isChecked()) {
			uploadBean.setSkin("1");
		}
		if (PFQK01_2.isChecked()) {
			uploadBean.setSkin("2");
		}
		if (PFQK01_3.isChecked()) {
			uploadBean.setSkin("3");
		}
		if (PFQK01_4.isChecked()) {
			uploadBean.setSkin("4");
		}
		if (PFQK01_5.isChecked()) {
			uploadBean.setSkin("5");
		}
		if (PFQK01_6.isChecked()) {
			uploadBean.setSkin("6");
		}
		if (PFQK01_7.isChecked()) {
			uploadBean.setSkin("7");
			uploadBean.setSkinDesc(PFQK01_8.getText().toString());
		}

		// 巩膜
		if (GMQK01_1.isChecked()) {
			uploadBean.setSclera("1");
		}
		if (GMQK01_2.isChecked()) {
			uploadBean.setSclera("2");
		}
		if (GMQK01_3.isChecked()) {
			uploadBean.setSclera("3");
		}
		if (GMQK01_4.isChecked()) {
			uploadBean.setSclera("4");
			uploadBean.setScleraDesc(GMQK01_5.getText().toString());
		}
		// 淋巴结
		if (LBQK01_1.isChecked()) {
			uploadBean.setLymphnodes("1");
		}
		if (LBQK01_2.isChecked()) {
			uploadBean.setLymphnodes("2");
		}
		if (LBQK01_3.isChecked()) {
			uploadBean.setLymphnodes("3");
		}
		if (LBQK01_4.isChecked()) {
			uploadBean.setLymphnodes("4");
			uploadBean.setLymphnodesDesc(LBQK01_5.getText().toString());
		}
		// 桶状胸
		if (TZX001_1.isChecked()) {
			uploadBean.setBarrelChest("1");
		}
		if (TZX001_2.isChecked()) {
			uploadBean.setBarrelChest("2");
		}

		// breathSound呼吸音
		if (HXY001_1.isChecked()) {
			uploadBean.setBreathSound("1");
		}
		if (HXY001_2.isChecked()) {
			uploadBean.setBreathSound("2");
			uploadBean.setBreathSoundDesc(HXY001_3.getText().toString());
		}
		// rales啰音
		if (LYQK01_1.isChecked()) {
			uploadBean.setRales("1");
		}
		if (LYQK01_2.isChecked()) {
			uploadBean.setRales("2");
		}
		if (LYQK01_3.isChecked()) {
			uploadBean.setRales("3");
		}
		if (LYQK01_4.isChecked()) {
			uploadBean.setRales("4");
			uploadBean.setRalesDesc(LYQK01_5.getText().toString());
		}
		// 心率次数
		uploadBean.setHeartRate(XLCS01.getText().toString());
		// 心律
		if (XLQK01_1.isChecked()) {
			uploadBean.setRhythm("1");
		}
		if (XLQK01_2.isChecked()) {
			uploadBean.setRhythm("2");
		}
		if (XLQK01_3.isChecked()) {
			uploadBean.setRhythm("3");
		}
		// 心脏杂音
		if (ZYQK01_1.isChecked()) {
			uploadBean.setHeartMurmur("1");
		}
		if (ZYQK01_2.isChecked()) {
			uploadBean.setHeartMurmur("2");
			uploadBean.setHeartMurmurDesc(ZYQK01_3.getText().toString());
		}

		// abdominAltend腹部压痛
		if (FBYT01_1.isChecked()) {
			uploadBean.setAbdominAltend("1");
		}
		if (FBYT01_2.isChecked()) {
			uploadBean.setAbdominAltend("2");
			uploadBean.setAbdominAltendDesc(FBYT01_3.getText().toString());
		}
		// adbominAlmass腹部包块
		if (FBBK01_1.isChecked()) {
			uploadBean.setAdbominAlmass("1");
		}
		if (FBBK01_2.isChecked()) {
			uploadBean.setAdbominAlmass("2");
			uploadBean.setAdbominAlmassDesc(FBBK01_3.getText().toString());
		}
		// liverBig肝大
		if (FBGD01_1.isChecked()) {
			uploadBean.setLiverBig("1");
		}
		if (FBGD01_2.isChecked()) {
			uploadBean.setLiverBig("2");
			uploadBean.setLiverBigDesc(FBGD01_3.getText().toString());
		}
		// splenomegaly脾大
		if (FBPD01_1.isChecked()) {
			uploadBean.setSplenomegaly("1");
		}
		if (FBPD01_2.isChecked()) {
			uploadBean.setSplenomegaly("2");
			uploadBean.setSplenomegalyDesc(FBPD01_3.getText().toString());
		}

		// <dullness>腹部移动性浊音<
		if (FBZY01_1.isChecked()) {
			uploadBean.setDullness("1");
		}
		if (FBZY01_2.isChecked()) {
			uploadBean.setDullness("2");
			uploadBean.setDullnessDesc(FBZY01_3.getText().toString());
		}
		// 下肢水肿
		if (XZSZ01_1.isChecked()) {
			uploadBean.setEdema("1");
		}
		if (XZSZ01_2.isChecked()) {
			uploadBean.setEdema("2");
		}
		if (XZSZ01_3.isChecked()) {
			uploadBean.setEdema("3");
		}
		if (XZSZ01_4.isChecked()) {
			uploadBean.setEdema("4");
		}
		// footPulse足背动脉搏动
		if (ZBDMBD_1.isChecked()) {
			uploadBean.setFootPulse("1");
		}
		if (ZBDMBD_2.isChecked()) {
			uploadBean.setFootPulse("2");
		}
		if (ZBDMBD_3.isChecked()) {
			uploadBean.setFootPulse("3");
		}
		if (ZBDMBD_4.isChecked()) {
			uploadBean.setFootPulse("4");
		}
		// dre肛门指诊
		StringBuilder gmzz01_sb = new StringBuilder();
		for (int j = 0; j < gmzz01.length; j++) {
			if (gmzz01[j].isChecked()) {
				gmzz01_sb.append((j + 1) + ",");
			}
			if (GMZZ01_5.isChecked()) {
				uploadBean.setDreDesc(GMZZ01_6.getText().toString());
			}
		}
		uploadBean.setDre(gmzz01_sb.toString());

		// ***********************乳腺*******************************
		StringBuilder rx0001_sb = new StringBuilder();
		for (int j = 0; j < rx0001.length; j++) {
			if (rx0001[j].isChecked()) {
				rx0001_sb.append((j + 1) + ",");
			}
			if (RX0001_5.isChecked()) {
				uploadBean.setBreastDesc(RX0001_6.getText().toString());
			}
		}
		uploadBean.setBreast(rx0001_sb.toString());

		// **************************外阴****************************
		if (FKWY01_1.isChecked()) {
			uploadBean.setVulva("1");
		}
		if (FKWY01_2.isChecked()) {
			uploadBean.setVulva("2");
			uploadBean.setVulvaDesc(FKWY01_3.getText().toString());
		}

		// **************************阴道****************************
		if (FKYD01_1.isChecked()) {
			uploadBean.setVaginal("1");
		}
		if (FKYD01_2.isChecked()) {
			uploadBean.setVaginal("2");
			uploadBean.setVaginalDesc(FKYD01_3.getText().toString());
		}

		// **************************宫颈****************************
		if (FKGJ01_1.isChecked()) {
			uploadBean.setCervix("1");
		}
		if (FKGJ01_2.isChecked()) {
			uploadBean.setCervix("2");
			uploadBean.setCervixDesc(FKGJ01_3.getText().toString());
		}

		// **************************宫体****************************
		if (FKGT01_1.isChecked()) {
			uploadBean.setPalace("1");
		}
		if (FKGT01_2.isChecked()) {
			uploadBean.setPalace("2");
			uploadBean.setPalaceDesc(FKGT01_3.getText().toString());
		}

		// **************************附件****************************
		if (FKFJ01_1.isChecked()) {
			uploadBean.setAttachment("1");
		}
		if (FKFJ01_2.isChecked()) {
			uploadBean.setAttachment("2");
			uploadBean.setAttachmentDesc(FKFJ01_3.getText().toString());
		}
		uploadBean.setTjother(CTQT01.getText().toString());
		return uploadBean;

	}

	public static final String xuetang = "xuetang";
	public static final int xuetang_code = 6;

	private void initView5(Activity view) {
		XHDB01 = (EditText) view.findViewById(R.id.XHDB01);
		XCGBXB = (EditText) view.findViewById(R.id.XCGBXB);
		XCGXXB = (EditText) view.findViewById(R.id.XCGXXB);
		XCGQT1 = (EditText) view.findViewById(R.id.XCGQT1);
		NCGNDB = (EditText) view.findViewById(R.id.NCGNDB);
		NCGNT1 = (EditText) view.findViewById(R.id.NCGNT1);
		NCGNTT = (EditText) view.findViewById(R.id.NCGNTT);
		NCGNQX = (EditText) view.findViewById(R.id.NCGNQX);
		NCGQT1 = (EditText) view.findViewById(R.id.NCGQT1);
		KFXT01 = (EditText) view.findViewById(R.id.KFXT01);
		// 设置点击血糖然后跳转到血糖测量。
		// Button btn_KFXT01 = (Button) view.findViewById(R.id.KFXT01_btn);
		// btn_KFXT01.setOnClickListener(new OnClickListener() {
		//
		// @Override
		// public void onClick(View v) {
		// Intent intent = new Intent(JKTJActivity2.this,
		// GLU_Activity.class);
		// intent.putExtra("xuetangflag", "jktj");
		// startActivityForResult(intent, xuetang_code);
		// }
		// });
		KFXT02 = (EditText) view.findViewById(R.id.KFXT02);

		XDT001 = (RadioGroup) view.findViewById(R.id.XDT001);
		XDT001_1 = (RadioButton) view.findViewById(R.id.XDT001_1);
		XDT001_2 = (RadioButton) view.findViewById(R.id.XDT001_2);
		XDT001_3 = (EditText) view.findViewById(R.id.XDT001_3);
		NWLBDB = (EditText) view.findViewById(R.id.NWLBDB);
		THXHDB = (EditText) view.findViewById(R.id.THXHDB);
		DBQX01 = (RadioGroup) view.findViewById(R.id.DBQX01);
		DBQX01_1 = (RadioButton) view.findViewById(R.id.DBQX01_1);
		DBQX01_2 = (RadioButton) view.findViewById(R.id.DBQX01_2);
		GYBMKY = (RadioGroup) view.findViewById(R.id.GYBMKY);
		GYBMKY_1 = (RadioButton) view.findViewById(R.id.GYBMKY_1);
		GYBMKY_2 = (RadioButton) view.findViewById(R.id.GYBMKY_2);
		GBZAM1 = (EditText) view.findViewById(R.id.GBZAM1);
		GCZAM1 = (EditText) view.findViewById(R.id.GCZAM1);
		BDB001 = (EditText) view.findViewById(R.id.BDB001);
		ZDHS01 = (EditText) view.findViewById(R.id.ZDHS01);
		JHDHS1 = (EditText) view.findViewById(R.id.JHDHS1);
		XQJG01 = (EditText) view.findViewById(R.id.XQJG01);
		XNSD01 = (EditText) view.findViewById(R.id.XNSD01);
		XJND01 = (EditText) view.findViewById(R.id.XJND01);
		XNND01 = (EditText) view.findViewById(R.id.XNND01);
		ZDGC01 = (EditText) view.findViewById(R.id.ZDGC01);
		GYSZ01 = (EditText) view.findViewById(R.id.GYSZ01);
		DDBDGC = (EditText) view.findViewById(R.id.DDBDGC);
		GDBDGC = (EditText) view.findViewById(R.id.GDBDGC);
		XBXXP1_3 = (EditText) view.findViewById(R.id.XBXXP1_3);
		BC0001_3 = (EditText) view.findViewById(R.id.BC0001_3);
		XBXXP1 = (RadioGroup) view.findViewById(R.id.XBXXP1);
		XBXXP1_1 = (RadioButton) view.findViewById(R.id.XBXXP1_1);
		XBXXP1_2 = (RadioButton) view.findViewById(R.id.XBXXP1_2);
		BC0001 = (RadioGroup) view.findViewById(R.id.BC0001);
		BC0001_1 = (RadioButton) view.findViewById(R.id.BC0001_1);
		BC0001_2 = (RadioButton) view.findViewById(R.id.BC0001_2);
		GJTP01 = (RadioGroup) view.findViewById(R.id.GJTP01);
		GJTP01_1 = (RadioButton) view.findViewById(R.id.GJTP01_1);
		GJTP01_2 = (RadioButton) view.findViewById(R.id.GJTP01_2);
		GJTP01_3 = (EditText) view.findViewById(R.id.GJTP01_3);
		FZJCQT = (EditText) view.findViewById(R.id.FZJCQT);
		// 先隐藏航创的协议里没有的字段
		// XQJG01.setVisibility(View.GONE);// 血清肌酐
		// XNSD01.setVisibility(View.GONE);// 血尿素氮
		// XJND01.setVisibility(View.GONE);// 血钾浓度
		// XNND01.setVisibility(View.GONE);// 血钠浓度
		// ZDGC01.setVisibility(View.GONE);// 总胆固醇
		// GYSZ01.setVisibility(View.GONE);// 甘油三酯
		// DDBDGC.setVisibility(View.GONE);// 血清低密度脂蛋白胆固醇
		// GDBDGC.setVisibility(View.GONE);// 血清高密度脂蛋白胆固醇
		//

		// LinearLayout ll_shengongneng1 = (LinearLayout) view
		// .findViewById(R.id.jktj5_ll_shengongneng1);
		// LinearLayout ll_shengongneng2 = (LinearLayout) view
		// .findViewById(R.id.jktj5_ll_shengongneng1);
		// LinearLayout ll_xuezhi1 = (LinearLayout) view
		// .findViewById(R.id.jktj5_ll_xuezhi1);
		// LinearLayout ll_xuezhi2 = (LinearLayout) view
		// .findViewById(R.id.jktj5_ll_xuezhi2);
		// ll_shengongneng1.setVisibility(View.GONE);
		// ll_shengongneng2.setVisibility(View.GONE);
		// ll_xuezhi1.setVisibility(View.GONE);
		// ll_xuezhi2.setVisibility(View.GONE);
	}

	public void setContent5() {
		// 肾脏功能
		AccessoryExamination uploadBean = mjktj_AccessoryExamination;
		XHDB01.setText(uploadBean.getHgb());// 血红蛋白
		XCGBXB.setText(uploadBean.getWbc());// >白细胞(10^9/L)
		XCGXXB.setText(uploadBean.getPlatelet());// 血小板(10^9/L)<
		XCGQT1.setText(uploadBean.getBloodOther());// 血常规其他
		NCGNDB.setText(uploadBean.getProteinuria());// 尿蛋白</
		NCGNT1.setText(uploadBean.getGlu());// 尿糖
		NCGNTT.setText(uploadBean.getDka());// 尿酮体
		NCGNQX.setText(uploadBean.getOc());// 尿潜血
		KFXT01.setText(uploadBean.getFbs());// 餐前血糖
		KFXT02.setText(uploadBean.getPbs());
		NCGQT1.setText(uploadBean.getUrineOther());

		// 心电图
		String XDT001 = uploadBean.getEcg();
		if (!TextUtils.isEmpty(XDT001)) {
			switch (XDT001) {
			case "1":
				XDT001_1.setChecked(true);
				break;
			case "2":
				XDT001_2.setChecked(true);
				XDT001_3.setText(uploadBean.getEcgText());
				break;
			}
		} else {
			// 如果心电图没有东西的话，就从数据库获取这个数据。
			try {
				xindian xindianBean = new xindian();
				xindianBean.setIdCard(BaseActivity.getIdCard());
				List<xindian> xindians = (List<xindian>) DBService
						.queryByIdCard(xindianBean);
				if (xindians != null && xindians.size() > 0) {
					xindian bean = xindians.get(xindians.size() - 1);
					String rhythm = bean.getRhythm();
					System.out.println("体检表获取了心电图结论：" + rhythm);
					if (rhythm.contains("正常心电图")) {
						XDT001_1.setChecked(true);
					} else {
						XDT001_2.setChecked(true);
					}
					int index = rhythm.indexOf("结论：");
					index += 3;
					String text = rhythm.substring(index, rhythm.length());
					XDT001_3.setText(text);
				}
			} catch (Exception e) {

			}
		}
		// 尿微量白蛋白
		NWLBDB.setText(uploadBean.getMalb());
		// 大便潜血
		String DBQX01 = uploadBean.getFob();
		if (!TextUtils.isEmpty(DBQX01)) {
			switch (DBQX01) {
			case "1":
				DBQX01_1.setChecked(true);
				break;
			case "2":
				DBQX01_2.setChecked(true);
				break;
			}
		}
		// 糖化血红蛋白
		THXHDB.setText(uploadBean.getHba1c());
		// 乙型肝炎表面抗原
		String GYBMKY = uploadBean.getHbsag();
		if (!TextUtils.isEmpty(GYBMKY)) {
			switch (GYBMKY) {
			case "1":
				GYBMKY_1.setChecked(true);
				break;

			case "2":
				GYBMKY_2.setChecked(true);
				break;
			}
		}
		// 血清谷丙转氨酶
		GBZAM1.setText(uploadBean.getAlt());
		// 血清谷草转氨酶
		GCZAM1.setText(uploadBean.getAst());
		// 白蛋白
		BDB001.setText(uploadBean.getAlb());
		// 总胆红素
		ZDHS01.setText(uploadBean.getTbil());
		// 结合胆红素
		JHDHS1.setText(uploadBean.getDbil());
		XQJG01.setText(uploadBean.getCr());// 血清肌酐
		XNSD01.setText(uploadBean.getBun());// 血尿素氮
		XJND01.setText(uploadBean.getKalemia());// 血钾浓度
		XNND01.setText(uploadBean.getNatremia());// 血钠浓度
		ZDGC01.setText(uploadBean.getTc());// 总胆固醇
		GYSZ01.setText(uploadBean.getTg());// 甘油三酯
		DDBDGC.setText(uploadBean.getLdl());// 血清低密度脂蛋白胆固醇
		GDBDGC.setText(uploadBean.getHdl());// 血清高密度脂蛋白胆固醇
		// 胸部X线片
		String XBXXP1 = uploadBean.getX();
		if (!TextUtils.isEmpty(XBXXP1)) {
			switch (XBXXP1) {
			case "1":
				XBXXP1_1.setChecked(true);
				break;
			case "2":
				XBXXP1_2.setChecked(true);
				XBXXP1_3.setText(uploadBean.getXText());
				break;
			}
		}
		// 胸部X线片异常描述
		// B超
		String BC0001 = uploadBean.getB();
		if (!TextUtils.isEmpty(BC0001)) {
			switch (BC0001) {
			case "1":
				BC0001_1.setChecked(true);
				break;
			case "2":
				BC0001_2.setChecked(true);
				BC0001_3.setText(uploadBean.getBText());
				break;
			}
		}

		// 宫颈涂片**
		String GJTP01 = uploadBean.getPs();
		if (!TextUtils.isEmpty(GJTP01)) {
			switch (GJTP01) {
			case "1":
				GJTP01_1.setChecked(true);
				break;
			case "2":
				GJTP01_2.setChecked(true);
				GJTP01_3.setText(uploadBean.getPsText());
				break;
			}
		}
		FZJCQT.setText(uploadBean.getFuOther());
	}

	public AccessoryExamination getUpload5() {
		// 肾脏功能
		AccessoryExamination uploadBean = mjktj_AccessoryExamination;
		uploadBean.setHgb(XHDB01.getText().toString());
		uploadBean.setWbc(XCGBXB.getText().toString());// >白细胞(10^9/L)</wbc>
		uploadBean.setPlatelet(XCGXXB.getText().toString());// 血小板(10^9/L)</platelet>
		uploadBean.setBloodOther(XCGQT1.getText().toString());// 血常规其他</bloodOther>
		uploadBean.setProteinuria(NCGNDB.getText().toString());// 尿蛋白</proteinuria>
		uploadBean.setGlu(NCGNT1.getText().toString());// 尿糖</glu>
		uploadBean.setDka(NCGNTT.getText().toString());// 尿酮体</dka>
		uploadBean.setOc(NCGNQX.getText().toString());// 尿潜血</oc>
		uploadBean.setFbs(KFXT01.getText().toString());
		uploadBean.setPbs(KFXT02.getText().toString());
		uploadBean.setUrineOther(NCGQT1.getText().toString());

		// 心电图
		if (XDT001_1.isChecked()) {
			uploadBean.setEcg("1");
		}
		if (XDT001_2.isChecked()) {
			uploadBean.setEcg("2");
			uploadBean.setEcgText(XDT001_3.getText().toString());
		}
		// 尿微量白蛋白
		uploadBean.setMalb(NWLBDB.getText().toString());
		// 大便潜血
		if (DBQX01_1.isChecked()) {
			uploadBean.setFob("1");
		}
		if (DBQX01_2.isChecked()) {
			uploadBean.setFob("2");
		}
		// 糖化血红蛋白
		uploadBean.setHba1c(THXHDB.getText().toString());
		// 乙型肝炎表面抗原
		if (GYBMKY_1.isChecked()) {
			uploadBean.setHbsag("1");
		}
		if (GYBMKY_2.isChecked()) {
			uploadBean.setHbsag("2");
		}
		// 血清谷丙转氨酶
		uploadBean.setAlt(GBZAM1.getText().toString());
		// 血清谷草转氨酶
		uploadBean.setAst(GCZAM1.getText().toString());
		// 白蛋白
		uploadBean.setAlb(BDB001.getText().toString());
		// 总胆红素
		uploadBean.setTbil(ZDHS01.getText().toString());
		uploadBean.setCr(XQJG01.getText().toString());// 血清肌酐
		uploadBean.setBun(XNSD01.getText().toString());// 血尿素氮
		uploadBean.setKalemia(XJND01.getText().toString()); // 血钾浓度
		uploadBean.setNatremia(XNND01.getText().toString()); // 血钠浓度
		uploadBean.setTc(ZDGC01.getText().toString()); // 总胆固醇
		uploadBean.setTg(GYSZ01.getText().toString()); // 甘油三酯
		uploadBean.setLdl(DDBDGC.getText().toString()); // 血清低密度脂蛋白胆固醇
		uploadBean.setHdl(GDBDGC.getText().toString()); // 血清高密度脂蛋白胆固醇
		// 结合胆红素
		uploadBean.setDbil(JHDHS1.getText().toString());
		// 胸部X线片
		if (XBXXP1_1.isChecked()) {
			uploadBean.setX("1");
		}
		// 胸部X线片异常描述
		else if (XBXXP1_2.isChecked()) {
			uploadBean.setX("2");
			uploadBean.setXText(XBXXP1_3.getText().toString());
		}
		// B超
		if (BC0001_1.isChecked()) {
			uploadBean.setB("1");
		}
		if (BC0001_2.isChecked()) {
			uploadBean.setB("2");
			uploadBean.setBText(BC0001_3.getText().toString());
		}
		// 宫颈涂片**
		if (GJTP01_1.isChecked()) {
			uploadBean.setPs("1");
		}
		if (GJTP01_2.isChecked()) {
			uploadBean.setPs("2");
			uploadBean.setPsText(GJTP01_3.getText().toString());
		}
		uploadBean.setFuOther(FZJCQT.getText().toString());
		return uploadBean;
	}

	private void initView6(Activity view) {
		// TODO Auto-generated method stub
		ZYPHZ1 = (RadioGroup) view.findViewById(R.id.ZYPHZ1);
		ZYPHZ1_0 = (RadioButton) view.findViewById(R.id.ZYPHZ1_0);
		ZYPHZ1_1 = (RadioButton) view.findViewById(R.id.ZYPHZ1_1);
		ZYPHZ1_2 = (RadioButton) view.findViewById(R.id.ZYPHZ1_2);
		ZYQXZ1 = (RadioGroup) view.findViewById(R.id.ZYQXZ1);
		ZYQXZ1_0 = (RadioButton) view.findViewById(R.id.ZYQXZ1_0);
		ZYQXZ1_1 = (RadioButton) view.findViewById(R.id.ZYQXZ1_1);
		ZYQXZ1_2 = (RadioButton) view.findViewById(R.id.ZYQXZ1_2);
		ZYYXZ1 = (RadioGroup) view.findViewById(R.id.ZYYXZ1);
		ZYYXZ1_0 = (RadioButton) view.findViewById(R.id.ZYYXZ1_0);
		ZYYXZ1_1 = (RadioButton) view.findViewById(R.id.ZYYXZ1_1);
		ZYYXZ1_2 = (RadioButton) view.findViewById(R.id.ZYYXZ1_2);
		ZYYXZ2 = (RadioGroup) view.findViewById(R.id.ZYYXZ2);
		ZYYXZ2_0 = (RadioButton) view.findViewById(R.id.ZYYXZ2_0);
		ZYYXZ2_1 = (RadioButton) view.findViewById(R.id.ZYYXZ2_1);
		ZYYXZ2_2 = (RadioButton) view.findViewById(R.id.ZYYXZ2_2);
		ZYTXZ1 = (RadioGroup) view.findViewById(R.id.ZYTXZ1);
		ZYTXZ1_0 = (RadioButton) view.findViewById(R.id.ZYTXZ1_0);
		ZYTXZ1_1 = (RadioButton) view.findViewById(R.id.ZYTXZ1_1);
		ZYTXZ1_2 = (RadioButton) view.findViewById(R.id.ZYTXZ1_2);
		ZYXRZ1 = (RadioGroup) view.findViewById(R.id.ZYXRZ1);
		ZYXRZ1_0 = (RadioButton) view.findViewById(R.id.ZYXRZ1_0);
		ZYXRZ1_1 = (RadioButton) view.findViewById(R.id.ZYXRZ1_1);
		ZYXRZ1_2 = (RadioButton) view.findViewById(R.id.ZYXRZ1_2);
		ZYXYZ1 = (RadioGroup) view.findViewById(R.id.ZYXYZ1);
		ZYXYZ1_0 = (RadioButton) view.findViewById(R.id.ZYXYZ1_0);
		ZYXYZ1_1 = (RadioButton) view.findViewById(R.id.ZYXYZ1_1);
		ZYXYZ1_2 = (RadioButton) view.findViewById(R.id.ZYXYZ1_2);
		ZYQYZ1 = (RadioGroup) view.findViewById(R.id.ZYQYZ1);
		ZYQYZ1_0 = (RadioButton) view.findViewById(R.id.ZYQYZ1_0);
		ZYQYZ1_1 = (RadioButton) view.findViewById(R.id.ZYQYZ1_1);
		ZYQYZ1_2 = (RadioButton) view.findViewById(R.id.ZYQYZ1_2);
		ZYTBZ1 = (RadioGroup) view.findViewById(R.id.ZYTBZ1);
		ZYTBZ1_0 = (RadioButton) view.findViewById(R.id.ZYTBZ1_0);
		ZYTBZ1_1 = (RadioButton) view.findViewById(R.id.ZYTBZ1_1);
		ZYTBZ1_2 = (RadioButton) view.findViewById(R.id.ZYTBZ1_2);
		// setRadioButton();
	}

	private void setRadioButton() {
		OnClickListener listener = new OnClickListener() {

			@Override
			public void onClick(View v) {
				RadioButton self = (RadioButton) v;
				if (self.isChecked()) {
					self.setChecked(false);
				} else {
					self.setChecked(true);
				}
			}
		};
		// 健康体检6
		ZYPHZ1_1.setOnClickListener(listener);
		ZYPHZ1_2.setOnClickListener(listener);
		ZYQXZ1_1.setOnClickListener(listener);
		ZYQXZ1_2.setOnClickListener(listener);
		ZYYXZ1_1.setOnClickListener(listener);
		ZYYXZ1_2.setOnClickListener(listener);
		ZYYXZ2_1.setOnClickListener(listener);
		ZYYXZ2_2.setOnClickListener(listener);
		ZYTXZ1_1.setOnClickListener(listener);
		ZYTXZ1_2.setOnClickListener(listener);
		ZYXRZ1_1.setOnClickListener(listener);
		ZYXRZ1_2.setOnClickListener(listener);
		ZYXYZ1_1.setOnClickListener(listener);
		ZYXYZ1_2.setOnClickListener(listener);
		ZYQYZ1_1.setOnClickListener(listener);
		ZYQYZ1_2.setOnClickListener(listener);
		ZYTBZ1_1.setOnClickListener(listener);
		ZYTBZ1_2.setOnClickListener(listener);
	}

	public void setContent6() {
		// 健康评估
		HealthAssessment ha = mjktj_HealthAssessment;
		String recognize = ha.getRecognize();
		if (!TextUtils.isEmpty(recognize)) {
			String[] rs = recognize.split(",");
			for (int i = 0; i < rs.length; i++) {
				switch (rs[i]) {
				case "11":
					ZYPHZ1_1.setChecked(true);
					break;
				case "12":
					ZYPHZ1_2.setChecked(true);
					break;
				case "21":
					ZYQXZ1_1.setChecked(true);
					break;
				case "22":
					ZYQXZ1_2.setChecked(true);
					break;
				case "31":
					ZYYXZ1_1.setChecked(true);
					break;
				case "32":
					ZYYXZ1_2.setChecked(true);
					break;
				case "41":
					ZYYXZ2_1.setChecked(true);
					break;
				case "42":
					ZYYXZ2_2.setChecked(true);
					break;
				case "51":
					ZYTXZ1_1.setChecked(true);
					break;
				case "52":
					ZYTXZ1_2.setChecked(true);
					break;
				case "61":
					ZYXRZ1_1.setChecked(true);
					break;
				case "62":
					ZYXRZ1_2.setChecked(true);
					break;
				case "71":
					ZYXYZ1_1.setChecked(true);
					break;
				case "72":
					ZYXYZ1_2.setChecked(true);
					break;
				case "81":
					ZYQYZ1_1.setChecked(true);
					break;
				case "82":
					ZYQYZ1_2.setChecked(true);
					break;
				case "91":
					ZYTBZ1_1.setChecked(true);
					break;
				case "92":
					ZYTBZ1_2.setChecked(true);
					break;
				default:
					break;
				}
			}
		}
	}

	public HealthAssessment getUpload6() {
		// 健康评估
		StringBuilder sb_zytzbs = new StringBuilder();
		if (ZYPHZ1_1 == null) {
			return null;
		}
		if (ZYPHZ1_1.isChecked()) {
			sb_zytzbs.append("11" + ",");
		} else if (ZYPHZ1_2.isChecked()) {
			sb_zytzbs.append("12" + ",");
		}
		if (ZYQXZ1_1.isChecked()) {
			sb_zytzbs.append("21" + ",");
		} else if (ZYQXZ1_2.isChecked()) {
			sb_zytzbs.append("22" + ",");
		}
		if (ZYYXZ1_1.isChecked()) {
			sb_zytzbs.append("31" + ",");
		} else if (ZYYXZ1_2.isChecked()) {
			sb_zytzbs.append("32" + ",");
		}
		if (ZYYXZ2_1.isChecked()) {
			sb_zytzbs.append("41" + ",");
		} else if (ZYYXZ2_2.isChecked()) {
			sb_zytzbs.append("42" + ",");
		}

		if (ZYTXZ1_1.isChecked()) {
			sb_zytzbs.append("51" + ",");
		} else if (ZYTXZ1_2.isChecked()) {
			sb_zytzbs.append("52" + ",");
		}

		if (ZYXRZ1_1.isChecked()) {
			sb_zytzbs.append("61" + ",");
		} else if (ZYXRZ1_2.isChecked()) {
			sb_zytzbs.append("62" + ",");
		}

		if (ZYXYZ1_1.isChecked()) {
			sb_zytzbs.append("71" + ",");
		} else if (ZYXYZ1_2.isChecked()) {
			sb_zytzbs.append("72" + ",");
		}
		if (ZYQYZ1_1.isChecked()) {
			sb_zytzbs.append("81" + ",");
		} else if (ZYQYZ1_2.isChecked()) {
			sb_zytzbs.append("82" + ",");
		}
		if (ZYTBZ1_1.isChecked()) {
			sb_zytzbs.append("91" + ",");
		} else if (ZYTBZ1_2.isChecked()) {
			sb_zytzbs.append("92" + ",");
		}
		HealthAssessment ha = mjktj_HealthAssessment;
		ha.setRecognize(sb_zytzbs.toString());
		return ha;

	}

	private void initView7(Activity view) {
		NXGJB1_1 = (CheckBox) view.findViewById(R.id.NXGJB1_1);
		NXGJB1_2 = (CheckBox) view.findViewById(R.id.NXGJB1_2);
		NXGJB1_3 = (CheckBox) view.findViewById(R.id.NXGJB1_3);
		NXGJB1_4 = (CheckBox) view.findViewById(R.id.NXGJB1_4);
		NXGJB1_5 = (CheckBox) view.findViewById(R.id.NXGJB1_5);
		NXGJB1_6 = (CheckBox) view.findViewById(R.id.NXGJB1_6);
		NXGJB3 = (EditText) view.findViewById(R.id.NXGJB3);
		XZJB03 = (EditText) view.findViewById(R.id.XZJB03);
		SZJB01_1 = (CheckBox) view.findViewById(R.id.SZJB01_1);
		SZJB01_2 = (CheckBox) view.findViewById(R.id.SZJB01_2);
		SZJB01_3 = (CheckBox) view.findViewById(R.id.SZJB01_3);
		SZJB01_4 = (CheckBox) view.findViewById(R.id.SZJB01_4);
		SZJB01_5 = (CheckBox) view.findViewById(R.id.SZJB01_5);
		SZJB01_6 = (CheckBox) view.findViewById(R.id.SZJB01_6);
		SZJB03 = (EditText) view.findViewById(R.id.SZJB03);
		XZJB01_1 = (CheckBox) view.findViewById(R.id.XZJB01_1);
		XZJB01_2 = (CheckBox) view.findViewById(R.id.XZJB01_2);
		XZJB01_3 = (CheckBox) view.findViewById(R.id.XZJB01_3);
		XZJB01_4 = (CheckBox) view.findViewById(R.id.XZJB01_4);
		XZJB01_5 = (CheckBox) view.findViewById(R.id.XZJB01_5);
		XZJB01_6 = (CheckBox) view.findViewById(R.id.XZJB01_6);
		XZJB01_7 = (CheckBox) view.findViewById(R.id.XZJB01_7);
		XZJB03 = (EditText) view.findViewById(R.id.XZJB03);
		XGJB01_1 = (CheckBox) view.findViewById(R.id.XGJB01_1);
		XGJB01_2 = (CheckBox) view.findViewById(R.id.XGJB01_2);
		XGJB01_3 = (CheckBox) view.findViewById(R.id.XGJB01_3);
		XGJB01_4 = (CheckBox) view.findViewById(R.id.XGJB01_4);
		XGJB03 = (EditText) view.findViewById(R.id.XGJB03);
		YBJB01_1 = (CheckBox) view.findViewById(R.id.YBJB01_1);
		YBJB01_2 = (CheckBox) view.findViewById(R.id.YBJB01_2);
		YBJB01_3 = (CheckBox) view.findViewById(R.id.YBJB01_3);
		YBJB01_4 = (CheckBox) view.findViewById(R.id.YBJB01_4);
		YBJB03 = (EditText) view.findViewById(R.id.YBJB03);
		SJXT01 = (RadioGroup) view.findViewById(R.id.SJXT01);
		SJXT01_1 = (RadioButton) view.findViewById(R.id.SJXT01_1);
		SJXT01_2 = (RadioButton) view.findViewById(R.id.SJXT01_2);
		SJXT02 = (EditText) view.findViewById(R.id.SJXT02);
		QTXT01 = (RadioGroup) view.findViewById(R.id.QTXT01);
		QTXT01_1 = (RadioButton) view.findViewById(R.id.QTXT01_1);
		QTXT01_2 = (RadioButton) view.findViewById(R.id.QTXT01_2);
		QTXT02 = (EditText) view.findViewById(R.id.QTXT02);
		NXGJB1_ = new CheckBox[] { NXGJB1_1, NXGJB1_2, NXGJB1_3, NXGJB1_4,
				NXGJB1_5, NXGJB1_6 };
		for (int i = 0; i < NXGJB1_.length; i++) {
			NXGJB1_[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int j = 1; j < NXGJB1_.length; j++) {
						if (NXGJB1_1 == v && NXGJB1_1.isChecked()) {
							NXGJB1_[j].setChecked(false);
						} else {
							NXGJB1_[0].setChecked(false);
						}
					}
				}
			});
		}
		SZJB01_ = new CheckBox[] { SZJB01_1, SZJB01_2, SZJB01_3, SZJB01_4,
				SZJB01_5, SZJB01_6 };
		for (int i = 0; i < SZJB01_.length; i++) {
			SZJB01_[i].setOnClickListener(new OnClickListener() {

				@Override
				public void onClick(View v) {
					for (int j = 1; j < SZJB01_.length; j++) {
						if (SZJB01_1 == v && SZJB01_1.isChecked()) {
							SZJB01_[j].setChecked(false);
						} else {
							SZJB01_[0].setChecked(false);
						}
					}

				}
			});
		}

		XZJB01_ = new CheckBox[] { XZJB01_1, XZJB01_2, XZJB01_3, XZJB01_4,
				XZJB01_5, XZJB01_6, XZJB01_7 };
		for (int i = 0; i < XZJB01_.length; i++)

		{
			XZJB01_[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int j = 1; j < XZJB01_.length; j++) {
						if (XZJB01_1 == v && XZJB01_1.isChecked()) {
							XZJB01_[j].setChecked(false);
						} else {
							XZJB01_[0].setChecked(false);
						}
					}

				}
			});
		}

		XGJB01_ = new CheckBox[] { XGJB01_1, XGJB01_2, XGJB01_3, XGJB01_4 };
		for (int i = 0; i < XGJB01_.length; i++)

		{
			XGJB01_[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int k = 1; k < XGJB01_.length; k++) {
						if (XGJB01_1.isChecked() && XGJB01_1 == v) {
							XGJB01_[k].setChecked(false);
						} else {
							XGJB01_[0].setChecked(false);
						}
					}

				}
			});
		}

		YBJB01_ = new CheckBox[] { YBJB01_1, YBJB01_2, YBJB01_3, YBJB01_4 };
		for (int i = 0; i < YBJB01_.length; i++)

		{
			YBJB01_[i].setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					for (int k = 1; k < YBJB01_.length; k++) {
						if (YBJB01_1 == v && YBJB01_1.isChecked()) {
							YBJB01_[k].setChecked(false);
						} else {
							YBJB01_[0].setChecked(false);
						}
					}
				}
			});
		}
	}

	public void setContent7() {
		base_info uploadBean = mjktj_baseInfo;
		// 脑血管疾病
		String NXGJB1 = uploadBean.getCerebrovascularDiseases();
		if (NXGJB1 != null) {
			String[] nxgjb = NXGJB1.split(",");
			for (int i = 0; i < nxgjb.length; i++) {
				if (!TextUtils.isEmpty(nxgjb[i])) {
					NXGJB1_[Integer.valueOf(nxgjb[i]) - 1].setChecked(true);
				}
				if (NXGJB1_6.isChecked()) {
					NXGJB3.setText(uploadBean.getOthercerebrovascularDiseases());
				}
			}
		}

		// 肾脏疾病
		String SZJB01 = uploadBean.getKidneyDiseases();
		if (SZJB01 != null) {
			String[] szjb01 = SZJB01.split(",");
			for (int i = 0; i < szjb01.length; i++) {
				if (!TextUtils.isEmpty(szjb01[i])) {
					SZJB01_[Integer.valueOf(szjb01[i]) - 1].setChecked(true);
				}
				if (SZJB01_6.isChecked()) {
					SZJB03.setText(uploadBean.getOtherkidneyDiseases());
				}
			}
		}

		// 心脏疾病
		String XZJB01 = uploadBean.getHeartDisease();
		if (XZJB01 != null) {
			String[] xzjb01 = XZJB01.split(",");
			for (int i = 0; i < xzjb01.length; i++) {
				if (!TextUtils.isEmpty(xzjb01[i])) {
					XZJB01_[Integer.valueOf(xzjb01[i]) - 1].setChecked(true);
				}
				if (XZJB01_7.isChecked()) {
					XZJB03.setText(uploadBean.getOtherheartDisease());
				}
			}
		}

		// 血管疾病
		String XGJB01 = uploadBean.getVascularDisease();
		if (XGJB01 != null) {
			String[] xgjb01 = XGJB01.split(",");
			for (int i = 0; i < xgjb01.length; i++) {
				if (!TextUtils.isEmpty(xgjb01[i])) {
					XGJB01_[Integer.valueOf(xgjb01[i]) - 1].setChecked(true);
				}
				if (XGJB01_4.isChecked()) {
					XGJB03.setText(uploadBean.getOtherVascularDisease());
				}
			}
		}
		// eyeDiseases眼部疾病
		String YBJB01 = uploadBean.getEyeDiseases();
		if (YBJB01 != null) {
			String[] ybjb01 = YBJB01.split(",");
			for (int i = 0; i < ybjb01.length; i++) {
				if (!TextUtils.isEmpty(ybjb01[i])) {
					YBJB01_[Integer.valueOf(ybjb01[i]) - 1].setChecked(true);
				}
				if (YBJB01_4.isChecked()) {
					YBJB03.setText(uploadBean.getOthereyeDiseases());
				}
			}
		}
		// 未发现 神经疾病
		String SJXT = uploadBean.getNeurologicalDiseases();
		if (!TextUtils.isEmpty(SJXT)) {
			String[] sjxt = SJXT.split(",");
			for (int j = 0; j < sjxt.length; j++) {
				switch (sjxt[j]) {
				case "1":
					SJXT01_1.setChecked(true);
					break;
				case "2":
					SJXT01_2.setChecked(true);
					SJXT02.setText(uploadBean.getNeurologicalDiseasesDesc());
					break;
				}
			}
		}
		// otherDiseasesone其他疾病。
		String QTXT = uploadBean.getOtherDiseasesone();
		if (!TextUtils.isEmpty(QTXT)) {
			String[] qtxt = QTXT.split(",");
			for (int i = 0; i < qtxt.length; i++) {
				switch (qtxt[i]) {
				case "1":
					QTXT01_1.setChecked(true);
					break;
				case "2":
					QTXT01_2.setChecked(true);
					QTXT02.setText(uploadBean.getOtherDiseasesoneDesc());
					break;
				}
			}
		}
	}

	public base_info getUpload7() {
		base_info uploadBean = mjktj_baseInfo;

		// 脑血管疾病
		StringBuilder nxgjb1_sb = new StringBuilder();
		for (int i = 0; i < NXGJB1_.length; i++) {
			if (NXGJB1_[i].isChecked()) {
				nxgjb1_sb.append((i + 1) + ",");
				if (NXGJB1_6.isChecked()) {
					uploadBean.setOthercerebrovascularDiseases(NXGJB3.getText()
							.toString());
				}
			}
		}
		uploadBean.setCerebrovascularDiseases(nxgjb1_sb.toString());

		// 肾脏疾病
		StringBuilder szjb01_sb = new StringBuilder();
		for (int i = 0; i < SZJB01_.length; i++) {
			if (SZJB01_[i].isChecked()) {
				szjb01_sb.append((i + 1) + ",");
				if (SZJB01_6.isChecked()) {
					uploadBean.setOtherkidneyDiseases(SZJB03.getText()
							.toString());
				}
			}
		}
		uploadBean.setKidneyDiseases(szjb01_sb.toString());

		// 心脏疾病
		StringBuilder xzjb01_sb = new StringBuilder();
		for (int i = 0; i < XZJB01_.length; i++) {
			if (XZJB01_[i].isChecked()) {
				xzjb01_sb.append((i + 1) + ",");
				if (XZJB01_7.isChecked()) {
					uploadBean
							.setOtherheartDisease(XZJB03.getText().toString());
				}
			}
		}
		uploadBean.setHeartDisease(xzjb01_sb.toString());

		// 血管疾病
		StringBuilder xgjb01_sb = new StringBuilder();
		for (int i = 0; i < XGJB01_.length; i++) {
			if (XGJB01_[i].isChecked()) {
				xgjb01_sb.append((i + 1) + ",");
				if (XGJB01_4.isChecked()) {
					uploadBean.setOtherVascularDisease(XGJB03.getText()
							.toString());
				}
			}
		}
		uploadBean.setVascularDisease(xgjb01_sb.toString());

		// eyeDiseases眼部疾病
		StringBuilder ybjb01_sb = new StringBuilder();
		for (int i = 0; i < YBJB01_.length; i++) {
			if (YBJB01_[i].isChecked()) {
				ybjb01_sb.append((i + 1) + ",");
				if (YBJB01_4.isChecked()) {
					uploadBean.setOthereyeDiseases(YBJB03.getText().toString());
				}
			}
		}
		uploadBean.setEyeDiseases(ybjb01_sb.toString());
		// 未发现 神经疾病
		if (SJXT01_1.isChecked()) {
			uploadBean.setNeurologicalDiseases("1");
		}
		if (SJXT01_2.isChecked()) {
			uploadBean.setNeurologicalDiseases("2");
			uploadBean.setNeurologicalDiseasesDesc(SJXT02.getText().toString());
		}
		// otherDiseasesone其他疾病。
		if (QTXT01_1.isChecked()) {
			uploadBean.setOtherDiseasesone("1");
		}
		if (QTXT01_2.isChecked()) {
			uploadBean.setOtherDiseasesone("2");
			uploadBean.setOtherDiseasesoneDesc(QTXT02.getText().toString());
		}
		return uploadBean;
	}

	private void InitView8(Activity view) {
		JKZD01_1 = (CheckBox) view.findViewById(R.id.JKZD01_1);
		JKZD01_2 = (CheckBox) view.findViewById(R.id.JKZD01_2);
		JKZD01_3 = (CheckBox) view.findViewById(R.id.JKZD01_3);
		JKZD01_4 = (CheckBox) view.findViewById(R.id.JKZD01_4);
		JKZD02 = (EditText) view.findViewById(R.id.JKZD02);
		WXYS01_1 = (CheckBox) view.findViewById(R.id.WXYS01_1);
		WXYS01_2 = (CheckBox) view.findViewById(R.id.WXYS01_2);
		WXYS01_3 = (CheckBox) view.findViewById(R.id.WXYS01_3);
		WXYS01_4 = (CheckBox) view.findViewById(R.id.WXYS01_4);
		WXYS01_5 = (CheckBox) view.findViewById(R.id.WXYS01_5);
		WXYS01_6 = (CheckBox) view.findViewById(R.id.WXYS01_6);
		WXYS01_7 = (CheckBox) view.findViewById(R.id.WXYS01_7);
		JTZMB1 = (EditText) view.findViewById(R.id.JTZMB1);
		JZYM02 = (EditText) view.findViewById(R.id.JZYM02);
		QTYS01 = (EditText) view.findViewById(R.id.QTYS01);

		JKPJ01_1 = (CheckBox) view.findViewById(R.id.JKPJ01_1);
		JKPJ01_2 = (CheckBox) view.findViewById(R.id.JKPJ01_2);
		JKYC01_1 = (EditText) view.findViewById(R.id.JKYC01_1);
		JKYC02_1 = (EditText) view.findViewById(R.id.JKYC02_1);
		JKYC03_1 = (EditText) view.findViewById(R.id.JKYC03_1);
		JKYC04_1 = (EditText) view.findViewById(R.id.JKYC04_1);
		CheckBox[] JKPJ = new CheckBox[] { JKPJ01_1, JKPJ01_2 };
		for (int i = 0; i < JKPJ.length; i++) {
			JKPJ[i].setOnClickListener(new OnClickListener() {

				@Override
				public void onClick(View v) {
					if (v == JKPJ01_1 && JKPJ01_1.isChecked()) {
						JKPJ01_2.setChecked(false);
						JKYC01_1.setText("");
						JKYC02_1.setText("");
						JKYC03_1.setText("");
						JKYC04_1.setText("");
					} else if (JKPJ01_2.isChecked()) {
						JKPJ01_1.setChecked(false);
					}

				}
			});
		}

		// 用药情况
		yyqkListView = (ListView) view.findViewById(R.id.yyqkListView);
		addMedicine = (Button) view.findViewById(R.id.btn_add_medicine);
		// 非免疫规划预防接种史
		fmyghyfjzs = (ListView) view.findViewById(R.id.fmyghyfjzs);
		addfmyghyfjzs = (Button) view.findViewById(R.id.addfmyghyfjzs);
		// 入/出院日期
		//
		QSRQ01_0 = (EditText) view.findViewById(R.id.QSRQ01_0);
		QSRQ01_1 = (EditText) view.findViewById(R.id.QSRQ01_1);
		QSRQ01_2 = (EditText) view.findViewById(R.id.QSRQ01_2);
		QSRQ01_3 = (EditText) view.findViewById(R.id.QSRQ01_3);
		QSRQ01_4 = (EditText) view.findViewById(R.id.QSRQ01_4);
		QSRQ01_5 = (EditText) view.findViewById(R.id.QSRQ01_5);
		//
		ZZRQ01_0 = (EditText) view.findViewById(R.id.ZZRQ01_0);
		ZZRQ01_1 = (EditText) view.findViewById(R.id.ZZRQ01_1);
		ZZRQ01_2 = (EditText) view.findViewById(R.id.ZZRQ01_2);
		ZZRQ01_3 = (EditText) view.findViewById(R.id.ZZRQ01_3);
		ZZRQ01_4 = (EditText) view.findViewById(R.id.ZZRQ01_4);
		ZZRQ01_5 = (EditText) view.findViewById(R.id.ZZRQ01_5);
		// 原因
		ZYYY01_0 = (EditText) view.findViewById(R.id.ZYYY01_0);

		ZYYY01_1 = (EditText) view.findViewById(R.id.ZYYY01_1);
		ZYYY01_2 = (EditText) view.findViewById(R.id.ZYYY01_2);
		ZYYY01_3 = (EditText) view.findViewById(R.id.ZYYY01_3);
		ZYYY01_4 = (EditText) view.findViewById(R.id.ZYYY01_4);
		ZYYY01_5 = (EditText) view.findViewById(R.id.ZYYY01_5);
		// 医疗机构名称
		YLJG02_0 = (EditText) view.findViewById(R.id.YLJG02_0);

		YLJG02_1 = (EditText) view.findViewById(R.id.YLJG02_1);
		YLJG02_2 = (EditText) view.findViewById(R.id.YLJG02_2);
		YLJG02_3 = (EditText) view.findViewById(R.id.YLJG02_3);
		YLJG02_4 = (EditText) view.findViewById(R.id.YLJG02_4);
		YLJG02_5 = (EditText) view.findViewById(R.id.YLJG02_5);
		// 病案号
		BAH001_0 = (EditText) view.findViewById(R.id.BAH001_0);

		BAH001_1 = (EditText) view.findViewById(R.id.BAH001_1);
		BAH001_2 = (EditText) view.findViewById(R.id.BAH001_2);
		BAH001_3 = (EditText) view.findViewById(R.id.BAH001_3);
		BAH001_4 = (EditText) view.findViewById(R.id.BAH001_4);
		BAH001_5 = (EditText) view.findViewById(R.id.BAH001_5);
		// 健康评价
		WXYS = new CheckBox[] { WXYS01_1, WXYS01_2, WXYS01_3, WXYS01_4,
				WXYS01_5, WXYS01_6, WXYS01_7 };
		// 健康指导
		JKZD = new CheckBox[] { JKZD01_1, JKZD01_2, JKZD01_3, JKZD01_4 };
		adapter5 = new FiveColmunAdapter(context, datas5);
		addMedicine.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				LayoutInflater inflater = (LayoutInflater) context
						.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
				final LinearLayout ll = (LinearLayout) inflater.inflate(
						R.layout.add_medicine_dialog, null);
				AlertDialog.Builder builder = new AlertDialog.Builder(context);
				builder.setView(ll);
				builder.setPositiveButton("确定",
						new DialogInterface.OnClickListener() {
							@Override
							public void onClick(DialogInterface dialog,
									int which) {
								String drugName = ((EditText) ll
										.findViewById(R.id.et_drugName))
										.getText().toString();
								String usage = ((EditText) ll
										.findViewById(R.id.et_usage)).getText()
										.toString();
								String dosage = ((EditText) ll
										.findViewById(R.id.et_dosage))
										.getText().toString();
								String time = ((EditText) ll
										.findViewById(R.id.et_time)).getText()
										.toString();
								boolean a = ((RadioButton) ll
										.findViewById(R.id.radioButton1))
										.isChecked();
								boolean b = ((RadioButton) ll
										.findViewById(R.id.radioButton2))
										.isChecked();
								boolean c = ((RadioButton) ll
										.findViewById(R.id.radioButton3))
										.isChecked();
								// 符合日期格式
								if (!TextUtils.isEmpty(time)
										&& TimeHelper.checkUploadTimeOK(time)) {

								} else {
									ToastTool.showShort(context, "用药时间格式不正确,如"
											+ TimeHelper.getJKTJCheckTime());
									return;
								}
								String compliance = "";
								if (a) {
									compliance = "规律";
								} else if (b) {
									compliance = "间断";
								} else if (c) {
									compliance = "不服药";
								}
								datas5.add(new String[] { drugName, usage,
										dosage, time, compliance });
								adapter5.notifyDataSetChanged();
							}
						});
				builder.setNegativeButton("取消", null);
				builder.create().show();
			}
		});
		yyqkListView.setAdapter(adapter5);
		//
		yyqkListView.setOnItemLongClickListener(new OnItemLongClickListener() {

			@Override
			public boolean onItemLongClick(final AdapterView<?> parent,
					View view, final int position, long id) {
				AlertDialog.Builder builder = new AlertDialog.Builder(context);
				builder.setMessage("您确定要删除该条记录？");
				builder.setPositiveButton("确定",
						new DialogInterface.OnClickListener() {

							@Override
							public void onClick(DialogInterface dialog,
									int which) {
								datas5.remove(position);
								adapter5.notifyDataSetChanged();
							}
						});
				builder.setNegativeButton("取消", null);
				builder.create().show();
				return true;
			}
		});
		adapter3 = new ThreeCloumAdpter(context, datas3);
		fmyghyfjzs.setAdapter(adapter3);
		// 添加非免疫的按钮
		addfmyghyfjzs.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				LayoutInflater inflater = (LayoutInflater) context
						.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
				final LinearLayout ll = (LinearLayout) inflater.inflate(
						R.layout.fmyghyfjzs, null);
				AlertDialog.Builder builder = new AlertDialog.Builder(context);
				builder.setView(ll);
				builder.setPositiveButton("确定",
						new DialogInterface.OnClickListener() {

							@Override
							public void onClick(DialogInterface dialog,
									int which) {
								String drugName = ((EditText) ll
										.findViewById(R.id.et_drugName))
										.getText().toString();
								String usage = ((EditText) ll
										.findViewById(R.id.et_usage)).getText()
										.toString();
								String dosage = ((EditText) ll
										.findViewById(R.id.et_dosage))
										.getText().toString();
								// 符合日期格式
								if (!TextUtils.isEmpty(usage)
										&& TimeHelper.checkUploadTimeOK(usage)) {

								} else {
									ToastTool.showShort(context, "接种日期格式不正确,如"
											+ TimeHelper.getJKTJCheckTime());
									return;
								}
								datas3.add(new String[] { drugName, usage,
										dosage });
								adapter3.notifyDataSetChanged();
							}
						});
				builder.setNegativeButton("取消", null);
				builder.create().show();
			}
		});
		fmyghyfjzs.setOnItemLongClickListener(new OnItemLongClickListener() {

			@Override
			public boolean onItemLongClick(AdapterView<?> arg0, View arg1,
					final int arg2, long arg3) {
				AlertDialog.Builder builder = new AlertDialog.Builder(context);
				builder.setMessage("您确定要删除该条记录？");
				builder.setPositiveButton("确定",
						new DialogInterface.OnClickListener() {

							@Override
							public void onClick(DialogInterface dialog,
									int which) {
								datas3.remove(arg2);
								adapter3.notifyDataSetChanged();
							}
						});
				builder.setNegativeButton("取消", null);
				builder.create().show();
				return true;
			}
		});
	}

	public void getUpload8() {
		InhospitalSituations = new ArrayList<InhospitalSituation>();
		MedicineSituations = new ArrayList<MedicineSituation>();
		NonimmuneInoculations = new ArrayList<NonimmuneInoculation>();
		if (!TextUtils.isEmpty(QSRQ01_0.getText())
				&& !TextUtils.isEmpty(ZZRQ01_0.getText())) {
			InhospitalSituation is = new InhospitalSituation();
			is.setType("1");
			is.setInhospitalDate(QSRQ01_0.getText().toString());
			is.setOuthospitalDate(ZZRQ01_0.getText().toString());
			is.setInhospitalReason(ZYYY01_0.getText().toString());
			is.setMedicalestablishmentName(YLJG02_0.getText().toString());
			is.setMedicalrecordNumber(BAH001_0.getText().toString());
			InhospitalSituations.add(is);
		}
		if (!TextUtils.isEmpty(QSRQ01_1.getText())
				&& !TextUtils.isEmpty(ZZRQ01_1.getText())) {
			InhospitalSituation is = new InhospitalSituation();
			is.setType("1");
			is.setInhospitalDate(QSRQ01_1.getText().toString());
			is.setOuthospitalDate(ZZRQ01_1.getText().toString());
			is.setInhospitalReason(ZYYY01_1.getText().toString());
			is.setMedicalestablishmentName(YLJG02_1.getText().toString());
			is.setMedicalrecordNumber(BAH001_1.getText().toString());
			InhospitalSituations.add(is);
		}
		if (!TextUtils.isEmpty(QSRQ01_2.getText())
				&& !TextUtils.isEmpty(ZZRQ01_2.getText())) {
			InhospitalSituation is = new InhospitalSituation();
			is.setType("1");
			is.setInhospitalDate(QSRQ01_2.getText().toString());
			is.setOuthospitalDate(ZZRQ01_2.getText().toString());
			is.setInhospitalReason(ZYYY01_2.getText().toString());
			is.setMedicalestablishmentName(YLJG02_2.getText().toString());
			is.setMedicalrecordNumber(BAH001_2.getText().toString());
			InhospitalSituations.add(is);
		}

		if (!TextUtils.isEmpty(QSRQ01_3.getText())
				&& !TextUtils.isEmpty(ZZRQ01_3.getText())) {
			InhospitalSituation is = new InhospitalSituation();
			is.setType("2");
			is.setInhospitalDate(QSRQ01_3.getText().toString());
			is.setOuthospitalDate(ZZRQ01_3.getText().toString());
			is.setInhospitalReason(ZYYY01_3.getText().toString());
			is.setMedicalestablishmentName(YLJG02_3.getText().toString());
			is.setMedicalrecordNumber(BAH001_3.getText().toString());
			InhospitalSituations.add(is);
		}
		if (!TextUtils.isEmpty(QSRQ01_4.getText())
				&& !TextUtils.isEmpty(ZZRQ01_4.getText())) {
			InhospitalSituation is = new InhospitalSituation();
			is.setType("2");
			is.setInhospitalDate(QSRQ01_4.getText().toString());
			is.setOuthospitalDate(ZZRQ01_4.getText().toString());
			is.setInhospitalReason(ZYYY01_4.getText().toString());
			is.setMedicalestablishmentName(YLJG02_4.getText().toString());
			is.setMedicalrecordNumber(BAH001_4.getText().toString());
			InhospitalSituations.add(is);
		}
		if (!TextUtils.isEmpty(QSRQ01_4.getText())
				&& !TextUtils.isEmpty(ZZRQ01_4.getText())) {
			InhospitalSituation is = new InhospitalSituation();
			is.setType("2");
			is.setInhospitalDate(QSRQ01_5.getText().toString());
			is.setOuthospitalDate(ZZRQ01_5.getText().toString());
			is.setInhospitalReason(ZYYY01_5.getText().toString());
			is.setMedicalestablishmentName(YLJG02_5.getText().toString());
			is.setMedicalrecordNumber(BAH001_5.getText().toString());
			InhospitalSituations.add(is);
		}
		// 给baseInfo设置上传的list集合。
		mjktj_baseInfo.setInhospitalSituations(InhospitalSituations);
		// 设置保存的xml
		mjktj_InhospitalSituation.setXml(XmlTool
				.getInhospitalSituationXml(InhospitalSituations));

		// 主要用药情况
		if (datas5.size() > 0) {
			for (int i = 0; i < datas5.size(); i++) {
				String[] yyqkm = datas5.get(i);
				MedicineSituation ms = new MedicineSituation();
				ms.setMedicine(yyqkm[0]);
				ms.setUse(yyqkm[1]);
				ms.setEachDose(yyqkm[2]);
				ms.setUseDate(yyqkm[3]);
				String medicineYield = yyqkm[4];
				if ("规律".equals(yyqkm[4])) {
					ms.setMedicineYield("1");
				} else if ("间断".equals(yyqkm[4])) {
					ms.setMedicineYield("2");
				} else if ("不服药".equals(yyqkm[4])) {
					ms.setMedicineYield("3");
				}
				// ms.setDescr(yyqkm[4]);
				MedicineSituations.add(ms);
			}
		}
		// 给baseInfo设置上传的list集合。
		mjktj_baseInfo.setMedicineSituations(MedicineSituations);
		// 设置保存的xml
		mjktj_MedicineSituation.setXml(XmlTool
				.getMedicineSituationXml(MedicineSituations));
		// 非免疫规划预防接种史
		if (datas3.size() > 0) {
			for (int i = 0; i < datas3.size(); i++) {
				String[] fmyjzm = datas3.get(i);
				NonimmuneInoculation ni = new NonimmuneInoculation();
				ni.setName(fmyjzm[0]);
				ni.setInoculationDate(fmyjzm[1]);
				ni.setInoculationUnit(fmyjzm[2]);
				NonimmuneInoculations.add(ni);
			}
		}
		// 给baseInfo设置上传的list集合。
		mjktj_baseInfo.setNonimmuneInoculations(NonimmuneInoculations);
		// 设置保存的xml
		mjktj_NonimmuneInoculation.setXml(XmlTool
				.getNonimmuneInoculationXml(NonimmuneInoculations));
		ha = mjktj_HealthAssessment;
		if (JKPJ01_1.isChecked()) {
			ha.setAbnormality("1");
		}
		if (JKPJ01_2.isChecked()) {
			ha.setAbnormality("2");
			ha.setAbnormality1(JKYC01_1.getText().toString());
			ha.setAbnormality2(JKYC02_1.getText().toString());
			ha.setAbnormality3(JKYC03_1.getText().toString());
			ha.setAbnormality4(JKYC04_1.getText().toString());
		}
		// 健康指导
		StringBuilder jkzd_sb = new StringBuilder();
		for (int i = 0; i < JKZD.length; i++) {
			if (JKZD[i].isChecked()) {
				jkzd_sb.append((i + 1) + ",");
				if (JKZD01_4.isChecked()) {
				}
			}
		}
		ha.setMana(jkzd_sb.toString());
		// 危险因素
		StringBuilder wxys_sb = new StringBuilder();
		for (int i = 0; i < WXYS.length; i++) {
			if (WXYS[i].isChecked()) {
				wxys_sb.append((i + 1) + ",");
				if (WXYS01_5.isChecked()) {
					ha.setTargetWeight(JTZMB1.getText().toString());
				}
				if (WXYS01_6.isChecked()) {
					ha.setVaccine(JZYM02.getText().toString());
				}
				if (WXYS01_7.isChecked()) {
					ha.setPjOther(QTYS01.getText().toString());
				}
			}
		}
		ha.setRiskfactorsControl(wxys_sb.toString());
	}

	private void setContent8() {

		List<InhospitalSituation> zhuyuanshis = XmlTool
				.parseInhospitalSituationByxml(mjktj_InhospitalSituation
						.getXml());
		System.out.println("setcontent8从数据库获取的xml住院"
				+ mjktj_InhospitalSituation.getXml());
		int zhuyuan = 0;
		int jiating = 0;
		if (zhuyuanshis.size() > 0) {
			for (int i = 0; i < zhuyuanshis.size(); i++) {
				InhospitalSituation is = zhuyuanshis.get(i);
				if (is != null) {
					if (is.getType().equals("1")) {
						if (zhuyuan == 0) {
							QSRQ01_0.setText(is.getInhospitalDate());
							ZZRQ01_0.setText(is.getOuthospitalDate());
							ZYYY01_0.setText(is.getInhospitalReason());
							YLJG02_0.setText(is.getMedicalestablishmentName());
							BAH001_0.setText(is.getMedicalrecordNumber());
							zhuyuan = 1;
							continue;
						}
						if (zhuyuan == 1) {
							QSRQ01_1.setText(is.getInhospitalDate());
							ZZRQ01_1.setText(is.getOuthospitalDate());
							ZYYY01_1.setText(is.getInhospitalReason());
							YLJG02_1.setText(is.getMedicalestablishmentName());
							BAH001_1.setText(is.getMedicalrecordNumber());
							zhuyuan = 2;
							continue;
						}
						if (zhuyuan == 2) {
							QSRQ01_2.setText(is.getInhospitalDate());
							ZZRQ01_2.setText(is.getOuthospitalDate());
							ZYYY01_2.setText(is.getInhospitalReason());
							YLJG02_2.setText(is.getMedicalestablishmentName());
							BAH001_2.setText(is.getMedicalrecordNumber());
							continue;
						}
					}
					if (is.getType().equals("2")) {
						if (jiating == 0) {
							QSRQ01_3.setText(is.getInhospitalDate());
							ZZRQ01_3.setText(is.getOuthospitalDate());
							ZYYY01_3.setText(is.getInhospitalReason());
							YLJG02_3.setText(is.getMedicalestablishmentName());
							BAH001_3.setText(is.getMedicalrecordNumber());
							jiating = 1;
							continue;
						}
						if (jiating == 1) {
							QSRQ01_4.setText(is.getInhospitalDate());
							ZZRQ01_4.setText(is.getOuthospitalDate());
							ZYYY01_4.setText(is.getInhospitalReason());
							YLJG02_4.setText(is.getMedicalestablishmentName());
							BAH001_4.setText(is.getMedicalrecordNumber());
							jiating = 2;
							continue;
						}
						if (jiating == 2) {
							QSRQ01_5.setText(is.getInhospitalDate());
							ZZRQ01_5.setText(is.getOuthospitalDate());
							ZYYY01_5.setText(is.getInhospitalReason());
							YLJG02_5.setText(is.getMedicalestablishmentName());
							BAH001_5.setText(is.getMedicalrecordNumber());
							continue;
						}
					}
				}

			}
		}
		List<MedicineSituation> MedicineSituations = XmlTool
				.parseMedicineSituationByxml(mjktj_MedicineSituation.getXml());
		// 主要用药情况
		for (int i = 0; i < MedicineSituations.size(); i++) {
			MedicineSituation ms = MedicineSituations.get(i);
			String[] yyqkm = new String[5];
			yyqkm[0] = ms.getMedicine();
			yyqkm[1] = ms.getUse();
			yyqkm[2] = ms.getEachDose();
			yyqkm[3] = ms.getUseDate();
			String yicongxing = ms.getMedicineYield();
			if ("1".equals(yicongxing)) {
				yyqkm[4] = "规律";
			} else if ("2".equals(yicongxing)) {
				yyqkm[4] = "间断";
			} else if ("3".equals(yicongxing)) {
				yyqkm[4] = "不服药";
			}
			datas5.add(yyqkm);
		}
		// 非免疫规划预防接种史
		List<NonimmuneInoculation> NonimmuneInoculations = XmlTool
				.parseNonimmuneInoculationByxml(mjktj_NonimmuneInoculation
						.getXml());

		for (int i = 0; i < NonimmuneInoculations.size(); i++) {
			NonimmuneInoculation ni = NonimmuneInoculations.get(i);
			String[] fmyjzm = new String[3];
			fmyjzm[0] = ni.getName();
			fmyjzm[1] = ni.getInoculationDate();
			fmyjzm[2] = ni.getInoculationUnit();
			System.out.println("循环获取的datas数据是" + fmyjzm[0] + "," + fmyjzm[1]
					+ "," + fmyjzm[2]);
			datas3.add(fmyjzm);
		}
		ha = mjktj_HealthAssessment;
		String abnormality = ha.getAbnormality();
		if ("1".equals(abnormality)) {
			JKPJ01_1.setChecked(true);
		} else if ("2".equals(abnormality)) {
			JKPJ01_2.setChecked(true);
			JKYC01_1.setText(ha.getAbnormality1());
			JKYC02_1.setText(ha.getAbnormality2());
			JKYC03_1.setText(ha.getAbnormality3());
			JKYC04_1.setText(ha.getAbnormality4());
		}

		// 健康指导
		String jkzd_sb = ha.getMana();
		String[] jkzds = jkzd_sb.split(",");
		for (int i = 0; i < jkzds.length; i++) {
			switch (jkzds[i]) {
			case "1":
				JKZD[0].setChecked(true);
				break;
			case "2":
				JKZD[1].setChecked(true);
				break;
			case "3":
				JKZD[2].setChecked(true);
				break;
			case "4":
				// JKZD[0].setChecked(true);
				break;

			default:
				break;
			}
		}
		// 危险因素
		String wxys = ha.getRiskfactorsControl();
		String[] wxyss = wxys.split(",");
		for (int i = 0; i < wxyss.length; i++) {
			switch (wxyss[i]) {
			case "1":
				WXYS[0].setChecked(true);
				break;
			case "2":
				WXYS[1].setChecked(true);
				break;
			case "3":
				WXYS[2].setChecked(true);
				break;
			case "4":
				WXYS[3].setChecked(true);
				break;
			case "5":
				WXYS[4].setChecked(true);
				JTZMB1.setText(ha.getTargetWeight());
				break;
			case "6":
				WXYS[5].setChecked(true);
				JZYM02.setText(ha.getVaccine());
				break;
			case "7":
				WXYS[6].setChecked(true);
				QTYS01.setText(ha.getPjOther());
				break;

			default:
				break;
			}
		}
	}

	public void printAll(View view) {
		// 先把数据填充到所有的对象中。然后通过生成图片的那个方法。把数据填到图片中
		getUpload1();
		getUpload2();
		getUpload3();
		getUpload4();
		getUpload5();
		getUpload6();
		getUpload7();
		getUpload8();
		// mjktj_baseInfo.setCheckDate(time);
		mjktj_baseInfo.setIdCard(mIdCard);
		mjktj_baseInfo.setCheckid(time);
		mjktj_baseInfo.setTime(time);
		/** 查体 */
		mjktj_Examination.setTime(time);
		/** 辅助检查 */
		mjktj_AccessoryExamination.setTime(time);
		/** 健康评价表 */
		mjktj_HealthAssessment.setTime(time);
		/** 生活方式 */
		mjktj_LifestySituation.setTime(time);
		/** 住院用药情况 */
		mjktj_MedicineSituation.setTime(time);
		/** 住院治疗情况 */
		mjktj_InhospitalSituation.setTime(time);
		/** 非免疫接种 */
		int viewId = view.getId();
		if (viewId == R.id.btn_printAll) {
			new BackGroundThread(new BackGroundThread.BackGroundTask() {

				@Override
				public void process() {
					JktjBitmapUtil.createjktjBitmaps(context, mjktj_baseInfo,
							mjktj_Examination, mjktj_AccessoryExamination,
							mjktj_HealthAssessment, mjktj_LifestySituation,
							mjktj_MedicineSituation, mjktj_InhospitalSituation,
							mjktj_NonimmuneInoculation, 0);
				}
			}).start();
		} else if (viewId == R.id.btn_printDan) {
			new BackGroundThread(new BackGroundThread.BackGroundTask() {

				@Override
				public void process() {
					JktjBitmapUtil.createjktjBitmaps(context, mjktj_baseInfo,
							mjktj_Examination, mjktj_AccessoryExamination,
							mjktj_HealthAssessment, mjktj_LifestySituation,
							mjktj_MedicineSituation, mjktj_InhospitalSituation,
							mjktj_NonimmuneInoculation, 1);
				}
			}).start();
		} else if (viewId == R.id.btn_printShuang) {
			new BackGroundThread(new BackGroundThread.BackGroundTask() {
				@Override
				public void process() {
					JktjBitmapUtil.createjktjBitmaps(context, mjktj_baseInfo,
							mjktj_Examination, mjktj_AccessoryExamination,
							mjktj_HealthAssessment, mjktj_LifestySituation,
							mjktj_MedicineSituation, mjktj_InhospitalSituation,
							mjktj_NonimmuneInoculation, 2);
				}
			}).start();
		}

	}

	Handler handler = new Handler() {

		@Override
		public void handleMessage(Message msg) {
			Toast.makeText(JKTJActivity2.this, (String) msg.obj, 0).show();
			super.handleMessage(msg);
		}

	};
	private String mIdCard;
}
